import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import style
style.use('ggplot')
import numpy as np

web_stats = {'Day':[1,2,3,4,5,6],
			 'Visitors':[43,53,34,45,64,34],
			'Bounce_Rate':[65,72,62,64,54,66]}

df = pd.DataFrame(web_stats)

#print(df)
#print(df.head())
#print(df.tail())
#print(df.tail(2))

print(df.set_index('Day'))

#These are the same
#df = df.set_index('Day')
df.set_index('Day', inplace=True)


print(df.head())

#same
#print(df['Visitors'])
print(df.Visitors)

print(df[['Bounce_Rate','Visitors']])

print(df.Visitors.tolist())


#This is not valid
#print(df[['Bounce Rate','Visitors']].tolist())

print(np.array(df[['Bounce_Rate','Visitors']]))

df2 = pd.DataFrame(np.array(df[['Bounce_Rate','Visitors']]))

print(df2)

8e2b5feec12ed6116b45441405a4d531233ab578
<mask token>

<mask token>
style.use('ggplot')
<mask token>
print(df.set_index('Day'))
df.set_index('Day', inplace=True)
print(df.head())
print(df.Visitors)
print(df[['Bounce_Rate', 'Visitors']])
print(df.Visitors.tolist())
print(np.array(df[['Bounce_Rate', 'Visitors']]))
<mask token>
print(df2)

<mask token>
style.use('ggplot')
<mask token>
web_stats = {'Day': [1, 2, 3, 4, 5, 6], 'Visitors': [43, 53, 34, 45, 64, 34
    ], 'Bounce_Rate': [65, 72, 62, 64, 54, 66]}
df = pd.DataFrame(web_stats)
print(df.set_index('Day'))
df.set_index('Day', inplace=True)
print(df.head())
print(df.Visitors)
print(df[['Bounce_Rate', 'Visitors']])
print(df.Visitors.tolist())
print(np.array(df[['Bounce_Rate', 'Visitors']]))
df2 = pd.DataFrame(np.array(df[['Bounce_Rate', 'Visitors']]))
print(df2)

import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import style
style.use('ggplot')
import numpy as np
web_stats = {'Day': [1, 2, 3, 4, 5, 6], 'Visitors': [43, 53, 34, 45, 64, 34
    ], 'Bounce_Rate': [65, 72, 62, 64, 54, 66]}
df = pd.DataFrame(web_stats)
print(df.set_index('Day'))
df.set_index('Day', inplace=True)
print(df.head())
print(df.Visitors)
print(df[['Bounce_Rate', 'Visitors']])
print(df.Visitors.tolist())
print(np.array(df[['Bounce_Rate', 'Visitors']]))
df2 = pd.DataFrame(np.array(df[['Bounce_Rate', 'Visitors']]))
print(df2)

import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import style
style.use('ggplot')
import numpy as np

web_stats = {'Day':[1,2,3,4,5,6],
			 'Visitors':[43,53,34,45,64,34],
			'Bounce_Rate':[65,72,62,64,54,66]}

df = pd.DataFrame(web_stats)

#print(df)
#print(df.head())
#print(df.tail())
#print(df.tail(2))

print(df.set_index('Day'))

#These are the same
#df = df.set_index('Day')
df.set_index('Day', inplace=True)


print(df.head())

#same
#print(df['Visitors'])
print(df.Visitors)

print(df[['Bounce_Rate','Visitors']])

print(df.Visitors.tolist())


#This is not valid
#print(df[['Bounce Rate','Visitors']].tolist())

print(np.array(df[['Bounce_Rate','Visitors']]))

df2 = pd.DataFrame(np.array(df[['Bounce_Rate','Visitors']]))

print(df2)
