In [2]:
import pandas as pd
import matplotlib.pyplot as plt
pd.set_option('display.notebook_repr_html', False)
pd.set_option('display.max_columns', 20)
pd.set_option('display.max_rows', 25)
mpl.rc('figure', figsize=(10, 8))
In [3]:
Telephone_agg = pd.read_csv('./data/NumberOfTelephones.csv', index_col=[0])
Telephone_agg
Out[3]:
In [4]:
Telephone_agg.plot(kind='bar')
Out[4]:
In [5]:
phones_statewise = pd.read_csv('./data/PhonesStatewise.csv', index_col=[0])
phones_statewise.head()
Out[5]:
This table provides State-wise and Circle-wise data related to number of telephones in India (in millions) at end of March of that year from 2010 upto 2013.
In [6]:
phones_statewise.describe()
Out[6]:
In [7]:
df = pd.DataFrame()
df['fixed'] = phones_statewise[['Fixed-2011', 'Fixed-2011', 'Fixed-2012', 'Fixed-2013']].sum(axis=1)
df['wireless'] = phones_statewise[['Wireless-2010', 'Wireless-2011', 'Wireless-2012', 'Wireless-2013']].sum(axis=1)
In [8]:
df['fixed'].plot(kind='bar')
Out[8]:
In [9]:
df['wireless'].plot(kind='bar')
Out[9]:
In [10]:
mpl.rc('figure', figsize=(18, 10))
phones_statewise[['Wireless-2010', 'Wireless-2011', 'Wireless-2012', 'Wireless-2013']].plot(kind='bar')
Out[10]:
In [11]:
phones_statewise.ix['Mumbai'][['Wireless-2010', 'Wireless-2011', 'Wireless-2012', 'Wireless-2013']].plot()
Out[11]: