Skip to content

Instantly share code, notes, and snippets.

View cloudSettings
{"lastUpload":"2020-02-27T05:28:55.097Z","extensionVersion":"v3.4.3"}
View useful_pandas_snippets.py
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!
@DanielVolz
DanielVolz / 0_reuse_code.js
Created Sep 26, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console