Last active
June 24, 2020 08:42
-
-
Save IyarLin/c7e7d1de5855a35a1caf04b1d6b8c88b to your computer and use it in GitHub Desktop.
python snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def filter_(df, f): | |
return df[f(df)] | |
pd.DataFrame.filter_ = filter_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
abspath = os.path.abspath("analysis script.py") | |
dname = os.path.dirname(abspath) | |
os.chdir(dname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment