lec1

import numpy as np
import pandas as pd
df1 = pd.read_csv('df1',index_col=0) #ye wala index set karta hai, so this is important

df1.head()
df2 = pd.read_csv('df2')

df1['A'].hist(bins=30) #using matplot lib under the hood, so you can pass the matplotlib items
df1['A'].plot(kind='hist',bins=500)
df1['A'].plot.hist()#imp method

df2.plot.area(alpha=0.4)
df2.plot.bar(stacked = True)
df2.head()
df1['A'].plot.hist(bins=50) #hist is the most comon
df1.plot.line(x=df1.index,y='B',figsize=(12,3),lw=1)#you can add matplot lib things
df1.plot.scatter(x='A',y='B',c='C')
#if i want to show by size, s = df1['C']*100
df2.plot.box()#boxplot
df = pd.DataFrame(np.random.randn(1000,2),columns=['a','b'])
df.head()
df.plot.hexbin(x='a',y='b',gridsize=25)
#if you want kde = density (both are same thing)
df2['a'].plot.kde()
df2.plot.kde() #if you want all those of the cols
plt.style.use('ggplot') #ggplot make it better

Exercise

df3.plot.scatter(x='b',y='a',figsize=(8,2))
df3['a'].plot.hist()

plt.style.use('ggplot')
df3['a'].plot.hist(bins=30)
df3.plot.box(y=['a','b'])
df3['d'].plot.kde()
df3['d'].plot.kde(linestyle='--')#(lw=5,ls='--')
df3[:30].plot.area()