df = pd.DataFrame({'a': [10]})
# df['a'] is a series, can be indexed with 1 index only
# will raise IndexingError, as expected
df['a'].iloc[0, 0]
df['a'].loc[0, 0]
# will raise nothing, not as expected
df['a'].iloc[0, 0] = 1000 # equivalent to pass
df['a'].loc[0, 0] = 1000 # equivalent to df['a'].loc[0] = 1000
See this SO post
Expected OutputExpected an IndexingError exception in every case where two values are used to index a Series.
output ofpd.show_versions()
pandas version 0.18.1, python 3.5
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4