Skip to content
Advertisement

Subplotting of Pandas.DataFrameGroupBy[group_name] does not yield expected results

This is a re-opening of my initial question with the same title which was closed as duplicate. As None of the suggested duplicates helped me to solve my problem, I post this question again.

I have a DataFrame with time series related to some devices which come from a hdf-file:

JavaScript

This produces the following output:

enter image description here

What am I doing wrong? I would like to have each of the plots in it’s own row, not all in one row.

The data file “data.h5” is available at: Google Drive

What I tried from the suggested posts:

Answer by joris, Mar 18, 2014 at 15:45 causes code to go into infinite loop, data is never plotted:

JavaScript

A variation is leading to same result as I described above:

JavaScript

Infinite loop happens as well for sedeh’s, Jun 4, 2015 at 15:26 answer:

JavaScript

Infinite loop happens as well for Justice_Lords, Mar 15, 2019 at 7:26 answer:

JavaScript

It seems to me that the problem is related to the fact that I plot with a pandas.DataFrameGroupBy and not a pandas.DataFrame

Advertisement

Answer

Seems like matplotlib was taking a long time to process the DatetimeIndex. Converting to a time and cleaning everything up did the trick:

JavaScript

enter image description here

Hope this helps.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement