This is a draft cheat sheet. It is a work in progress and is not finished yet.
Dates and Time
pd.to_datetime("3:55:45 Apr. 2nd 90") |
pd.read_csv("path", parse_dates=["date_time_col"]) |
s.dt.year (quarter, month, day, hour, etc) |
s.dt.hour (minute, second, etc) |
s.dt.weekofyear (dayofweek, weekday, etc) |
df["date_time"].dt.date |
df["date_time"] > "2019-12-23" |
df["date_time"].between("1988", "1989") |
|
|
Dataframes & Datasets
pd.read_csv() |
df.head() |
df.tail() |
df.info() |
Basic DataFrame Methods
df.min() |
df.max() |
df.sum() |
df.count() |
df.mean() |
df.median() |
df.mode() |
df.describe() |
Series & Column
s.unique() |
s.nunique() |
s.nlargest() |
s.nsmallest() |
s.value_counts() |
s.plot() |
|
|
|