Advertisement
Dodma

Untitled

Apr 28th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. games.drop(index = games[games['name']=='NaN'].index, inplace = True)
  2. games['name'].isnull().sum()
  3.  
  4. IndexError Traceback (most recent call last)
  5. <ipython-input-72-309779fe867b> in <module>
  6. ----> 1 games.drop(index = games[games['name']=='NaN'].index, inplace = True)
  7. 2 games['name'].isnull().sum()
  8.  
  9. /opt/conda/lib/python3.7/site-packages/pandas/core/indexes/base.py in __getitem__(self, key)
  10. 4278 if is_scalar(key):
  11. 4279 key = com.cast_scalar_indexer(key)
  12. -> 4280 return getitem(key)
  13. 4281
  14. 4282 if isinstance(key, slice):
  15.  
  16. 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