Skip to content
JTuto

Questions And Answers

  • [SOLVED] @Component always null in spring boot
  • [SOLVED] How to Keep the Screen on When Your Laptop Lid Is Closed?
  • [SOLVED] File chooser from gallery work but it doesn't work with camera in android webview
  • [SOLVED] Android Studio- where the library classes are stored
  • [SOLVED] Looking for a Jetpack Compose YouTube Video Player wrapper dependency
  • [SOLVED] Android M: Programmatically revoke permissions
  • [SOLVED] I have made listview with checkbox but while scrolling listview more checkbox is select randomly and it does not hold their position
  • [SOLVED] Android 13 Automotive emulator not work with "No accelerated colorsapce conversion found" warnning
  • [SOLVED] How to add dividers between items in a LazyColumn Jetpack Compose?
  • [SOLVED] Google Play App Signing - KeyHash Mismatch

[SOLVED] Plottin grouped charts in altair from a pandas data fra

Issue

This Content is from Stack Overflow. Question asked by ozzboy

Here is my data frame:

enter image description here

I would like to plot a chart like this:

enter image description here

How would I do this in altair charts in python?



Solution

You can just do

df.set_index(['student','subject']).plot.bar(rot=0)


This Question was asked in StackOverflow by ozzboy and Answered by BENY It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?

    Web Hosting Contact License Legal Notice Privacy Policy

© 2023 JTuto

Go to mobile version