I have an example dataframe defined like this in python:
df = pd.DataFrame({
'col1': ['Item0', 'Item0', 'Item1', 'Item1'],
'col2': ['Gold', 'Bronze', 'Gold', 'Silver'],
'col3': [1, 2, np.nan, 4]
})
when I try to print the dataframe df in jupyter notebook by simply typing df in jupyter and executing it I am getting an error:
TypeError: The numpy boolean negative, the - operator, is not supported, use the ~ operator or the logical_not function instead.
I have tried print(df), converting to html table and printing it, display(df) all are showing the same error.
PS: print(df) or just df were working perfectly fine in jupyter a few weeks back.
dfwhat doestype(df)show? Also try restarting your kernel as it looks like you have some incorrect statedf.