10

after execute :

df =pd.pivot_table(data_frame, values='volume', index=['marque'], columns=['canaux_vn_argus','annee'], aggfunc=np.sum, fill_value=0)

I have this Exception: 'NoneType' object is not callable I use:

  • Python 3.10.0
  • Pandas 1.4.0
m-zemmouri
  • 123
  • 8

2 Answers2

13

Ran into the same problem, after some digging this seems to be an issue with Cython.

Unresolved using the newest python release 3.10.2, pandas==1.4.1 & numpy==1.22.2

This only happens in the debugger, please try running your code without the IDE debugger.

This will be released in the next Cython release, best to follow the below two issues to get notified once resolved:
https://github.com/cython/cython/issues/4609
https://github.com/pandas-dev/pandas/issues/41935

  • Bugs that only occur while in debug mode are maddening. I just lost 45min that can never be recovered... Thanks for the heads up! – Brady Oct 04 '22 at 10:21
1

Upgrade panda and numpy to latest. This will solve the problem even in debug mode .