Last active
February 19, 2020 19:03
-
-
Save westonplatter/7511cd7c2d42da21615851bd45bb54d4 to your computer and use it in GitHub Desktop.
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
# Pandas operations | |
## getting and setting df rows | |
credit goes to https://stackoverflow.com/a/29262040/665578 | |
for i, row in df.iterrows(): | |
ifor_val = something | |
if <condition>: | |
ifor_val = something_else | |
df.at[i,'ifor'] = ifor_val | |
## setting number of displayed columns | |
code, | |
pd.options.display.max_colwidth = 60 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment