Skip to content

Instantly share code, notes, and snippets.

from googleapiclient.discovery import build
import datetime
import re
import sys
import youtube_dl
import os
from typing import List
#I have no idea why this line is needed but without it nothing works
sys.modules['win32file'] = None
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@miguelgrinberg
miguelgrinberg / pycon-views.py
Last active September 18, 2022 05:41
Generate statistics about PyCon 2014 videos
import argparse
import re
from multiprocessing.pool import ThreadPool as Pool
import requests
import bs4
root_url = 'http://pyvideo.org'
index_url = root_url + '/category/50/pycon-us-2014'