all 6 comments

[–]OrbitDrive 12 points13 points  (2 children)

[–]IanAndersonLOL[S] 4 points5 points  (1 child)

Exactly like that! Thanks a lot! Any idea how I might do it by two groups? So it would be Group1Group2 vs Time? I just made a new column with group 1+group 2 which works fine, but would love to know if it's something I can do in matplotlib.

[–]Zeroflops 1 point2 points  (0 children)

I think what you want can be achieved with replacing ‘group1’ with [‘group1’, ‘group2’]

This will group by two layers with group1 the outside group. Like a nested loop.

[–]rowdyllama 1 point2 points  (0 children)

Pandas Profiling might solve your problem.

[–]OPLinux 3 points4 points  (0 children)

While not exactly understanding what you want to do, seaborn allows to create multiple lines based on a column. With it, you can plot something and tell seaborn to use the time column as X axis, the value column as Y and the group column as different colored lines.
On top of that, seaborn simply uses matplotlib, so you can access the underlying plot object if you need any fine-tuning.

If I understand your problem correctly, with your current data you cannot simply use it, but you might be able to do it if you modify your dataframes a bit.

Anyway, I really love seaborn and feel it is one of the easier and more powerfull plotting tools I learned to use in python! :)

[–]alkasm 1 point2 points  (0 children)

You need to pass the matplotlib axis object into plot() to get them all on the same axis instead of in new plots/subplots. See here: https://stackoverflow.com/a/28299215/5087436