You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pandas raises a ValueError when assigning multiple values to a Series (or DataFrame) using range(x) where x > 1. This error is raised only when its length is one million or larger.
importpandasaspdforxin [5, 999999, 1000000]:
s=pd.Series(index=range(x))
print('series length =', len(s))
# assigning value with range(1), always workss.loc[range(1)] =42# reading values with range(x>1), always works_=s.loc[range(2)]
# assigning values with range(x>1), fails only when len >= 1 millions.loc[range(2)] =42
Version 0.17.1
* tag 'v0.17.1': (168 commits)
add nbviewer link
Revert "DOC: fix sponsor notice"
DOC: a few touchups
DOC: fix sponsor notice
DOC: warnings and remove HTML
COMPAT: compat of scalars on all platforms, xref pandas-dev#11638
DOC: fix build errors/warnings
DOC: whatsnew edits
DOC: fix link syntax
DOC: update release.rst / whatsnew edits
BUG: fix col iteration in DataFrame.round, pandas-dev#11611
DOC: Clarify foramtting
BUG: pandas-dev#11638 return correct dtype for int and float
BUG: pandas-dev#11637 fix to_csv incorrect output.
DOC: sponsor notice
BUG: indexing with a range , pandas-dev#11652
Fix link to numexpr
ENH: fixup tilde expansion, xref pandas-dev#11438
ENH: tilde expansion for write output formatting functions, pandas-dev#11438
DOC: fix up doc-string creations in generic.py
...
From SO (http://stackoverflow.com/questions/33814223/strange-error-in-pandas-indexing-with-range-when-length-1-000-000)
Pandas raises a ValueError when assigning multiple values to a Series (or DataFrame) using range(x) where x > 1. This error is raised only when its length is one million or larger.
Output:
Tested on pandas 0.17.0 and python 3.4.
The text was updated successfully, but these errors were encountered: