Advertisement
Dodma

Untitled

Apr 28th, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. games['name'].drop_duplicates().reset_index(drop=True)
  2. games['name'].duplicated().sum()
  3.  
  4. ---------------------------------------------------------------------------
  5. IndexError Traceback (most recent call last)
  6. <ipython-input-39-0f20960c0078> in <module>
  7. ----> 1 games['name'].drop_duplicates().reset_index(drop=True)
  8. 2 games['name'].duplicated().sum()
  9.  
  10. /opt/conda/lib/python3.7/site-packages/pandas/core/indexes/base.py in __getitem__(self, key)
  11. 4278 if is_scalar(key):
  12. 4279 key = com.cast_scalar_indexer(key)
  13. -> 4280 return getitem(key)
  14. 4281
  15. 4282 if isinstance(key, slice):
  16.  
  17. IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement