Created
June 26, 2013 02:07
-
-
Save godber/5864201 to your computer and use it in GitHub Desktop.
Assignment via the pandas attribute accessor does not appear to work in Pandas 0.11. Should it?
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
| phxtemps2 | |
| # <class 'pandas.core.frame.DataFrame'> | |
| # DatetimeIndex: 14596 entries, 1973-01-01 00:00:00 to 2012-12-31 00:00:00 | |
| # Data columns (total 2 columns): | |
| # highs 14596 non-null values | |
| # lows 14596 non-null values | |
| # dtypes: float64(2) | |
| # happy | |
| phxtemps2['diff'] = phxtemps2.highs - phxtemps2.lows | |
| # sad | |
| phxtemps2.diff = phxtemps2.highs - phxtemps2.lows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment