import numpy as np
import pandas as pd
df1['A'].plot(kind='hist', bins = 30)
df[df[B] == 1][A].plot(kind='hist', bins = 30)
df = pd.read_csv('loan_data.csv')
df.head()
plt.figure()
df[df['credit.policy']==1]['fico'].plot(kind = 'hist', bins = 30, color = 'blue', alpha = 0.5, label = 'Credit.Policy=1')
df[df['credit.policy']==0]['fico'].plot(kind = 'hist', bins = 30, color = 'red', alpha = 0.5, label = 'Credit.Policy=0')
plt.legend()
plt.xlabel('FICO')
df2.plot.area(alpha = 0.4)
df1.plot.line(x=df1.index, y = 'B')
df2.plot.bar(alpha = 0.4)
df2.plot.bar(alpha = 0.4, stacked = True)
df1.plot.scatter(x='A', y='B')
df1.plot.scatter(x='A', y='B', c='C', cmap='coolwarm')
df1.plot.scatter(x='A', y='B', s=df1['C']*100)
df1[['A','B']].plot.box()
df2.plot.density(lw=5,ls='--')
df = pd.DataFrame(np.random.randn(1000, 2), columns=['a', 'b'])df.plot.hexbin(x='a', y='b', gridsize=25, cmap='coolwarm')