Skip to content

Instantly share code, notes, and snippets.

View chemickypes's full-sized avatar
📱

Angelo Moroni chemickypes

📱
View GitHub Profile
import json
from pathlib import Path
def normalized(name):
return (name.replace("-", "_")).lower()
def prettyHex(num):
return str(hex(num)).replace("0x","")
@JeyDi
JeyDi / PandasSQLQuery.py
Last active March 4, 2022 07:08
From SQL to Python Pandas
# From SQL to Python Pandas Cheatsheet
# many thanks to: https://medium.com/jbennetcodes/how-to-rewrite-your-sql-queries-in-pandas-and-more-149d341fc53e
# Using airports data example: https://ourairports.com/data/
import pandas as pd
# Reset Pandas Index
df.reset_index(drop=True, inplace=True)
# Simply add a columns with an easy calculation