ranaroussi / quantstats

Portfolio analytics for quants, written in Python
Apache License 2.0
4.73k stars 827 forks source link

Fix TypeError throws when execute pandas pivot function #263

Closed manhinhang closed 1 year ago

manhinhang commented 1 year ago

Exception

TypeError: DataFrame.pivot() takes 1 positional argument but 4 were given

tibkiss commented 1 year ago

Closes https://github.com/ranaroussi/quantstats/issues/259 And also conflicts/replaces https://github.com/ranaroussi/quantstats/pull/260

I'm in favor of this change, but I'd suggest that there is a rigorous check to make sure that the new Pandas version doesn't create any other problems .

froggleston commented 1 year ago

From my limited testing of my notebook that uses quantstats, it seems this is a fairly straightforward fix to get at least the basics of the library up and working working with pandas 2. It would be great to see this merged before other in-depth checks are done across the wider codebase.

diegolovison commented 1 year ago

This solve the issue for me