'OverflowError even with large agg.path.chunksize
I'm working with the NYC MVA data. The dataset contains approximately 1.7 million records of crash data around NYC. I've created a new variable called TOTAL PEDESTRIAN CASUALTIES, and I'm trying to plot it against the hours of the day:
plt.plot(df['TOTAL PEDESTRIAN CASUALTIES'], df['CRASH TIME'].dt.hour)
When I do this, I get the following error:
OverflowError: Exceeded cell block limit (set 'agg.path.chunksize' rcparam)
As per Serenity's answer, I've tried to set the rcParams:
import matplotlib as mpl
mpl.rcParams['agg.path.chunksize'] = 2_000_000
Yet even with a chunksize of 2 million, it is still too small. I've gone even bigger than that, with no effect. And apparently, I should be able to do more with less.
How can I correct this issue to create this plot?
Solution 1:[1]
I just restarted my IDE with the setting mpl.rcParams['agg.path.chunksize'] = 10000 before my plt.plot() and it seemed to work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Madhur Adlakha |
