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
Describe the bug
Pandas does not work when printing multiple columns of dataframes
To Reproduce
Steps to reproduce the behavior:
importpandasaspdcafes=pd.DataFrame({
'zip': [30324,],
'poc': ['jared', ]
})
# this worksprint(cafes['zip'])
print('------')
print(cafes['poc'])
# this doesn'tprint(cafes[['zip', 'poc']])
Expected behavior
Pandas prints without error as it does when running in the terminal
Other Information (please complete the following information):
OS: Win10
Python Version: 3.6
Additional context
It's weird because usually errors happen the second or third run, but this error happens immediately. So it's not related to the module or jsonpickle logic.
Error:
Traceback (most recent call last):
line 14, in <module>
File "C:\Users\almenon\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 2806, in __getitem__
indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
File "C:\Users\almenon\AppData\Roaming\Python\Python36\site-packages\pandas\core\indexing.py", line 1552, in _get_listlike_indexer
keyarr, indexer, o._get_axis_number(axis), raise_missing=raise_missing
File "C:\Users\almenon\AppData\Roaming\Python\Python36\site-packages\pandas\core\indexing.py", line 1634, in _validate_read_indexer
missing = (indexer < 0).sum()
File "C:\Users\almenon\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\_methods.py", line 47, in _sum
return umr_sum(a, axis, dtype, out, keepdims, initial, where)
TypeError: int() argument must be a string, a bytes-like object or a number, not '_NoValueType'
The text was updated successfully, but these errors were encountered:
Just doing a normal exec works 🤔 why does my exec fail?
code="""import pandas as pdcafes = pd.DataFrame({'zip': [30324,],'poc': ['jared', ]})# this worksprint(cafes['zip'])print('------')print(cafes['poc'])# this doesn'tprint(cafes[['zip', 'poc']])"""exec(code)
Describe the bug
Pandas does not work when printing multiple columns of dataframes
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Pandas prints without error as it does when running in the terminal
Other Information (please complete the following information):
Additional context
It's weird because usually errors happen the second or third run, but this error happens immediately. So it's not related to the module or jsonpickle logic.
Error:
The text was updated successfully, but these errors were encountered: