Skip to content

Accept cookies consent from Youtube

I’m trying to retrieve a list of Youtube videos from a Youtube channel, say “https://www.youtube.com/user/YouTube/videos”, to get the nth first videos (thanks to the key = “videoId”). It used to work like a charm until a few days ago, when it started to ask for my consent. I trie…

Sampling data from the pandas dataframe

I am trying to sample data from a big dataset. The dataset is like Code to generate a sample dataset The distribution of labels in the dataset is I created a new column in the dataset When I am trying to sample say 5000 items The distribution of the labels in the sampledf is not same as that in the