Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import matplotlib.pyplot as plt
- df = pd.DataFrame([1,2,2,3,4,4,4,5])
- p = df.hist()
- p[0][0].set_title("my histogram")
- plt.savefig('output.png')
- plt.show()
- #####################################################
- import pandas as pd
- import matplotlib.pyplot as plt
- df = pd.DataFrame([1,2,2,3,4,4,4,5])
- df.hist()
- plt.show()
- df.boxplot()
- plt.show()
- #####################################################
- import pandas as pd
- import matplotlib.pyplot as plt
- df = pd.DataFrame([1,2,2,3,4,4,4,5])
- fig, ax = plt.subplots(2,2) # 1 row, 2 columns
- df.hist(ax=ax[0][0])
- df.boxplot(ax=ax[0][1])
- df.plot(ax=ax[1][0])
- df.plot(ax=ax[1][1], kind='bar')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement