Created
July 3, 2019 08:38
-
-
Save DataSolveProblems/7242e7960d93c025b7d1a4aaa3607cea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
df = pd.DataFrame({ | |
'a': np.random.randint(0, 5, size=5), | |
'b': np.random.randint(0, 5, size=5), | |
'c': np.random.randint(0, 5, size=5) | |
}) | |
df.plot(kind='barh', stacked=True) | |
df.plot(kind='bar', stacked=True) | |
plt.legend(loc='upper left') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment