Value of the Rupee vs Dollar vs Time


In [9]:
from __future__ import division
%matplotlib inline
#import nds2
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('seaborn-talk')
#import matplotlib.mlab as mlab
#import scipy.signal as sig
import scipy.constants as const

import pandas as pd

#from matplotlib import rc
#rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
## for Palatino and other serif fonts use:
plt.rcParams['font.family'] = 'Palatino'
plt.rcParams['font.size'] = 18
plt.rcParams['axes.labelsize'] = plt.rcParams['font.size']
plt.rcParams['axes.titlesize'] = 1.5*plt.rcParams['font.size']
plt.rcParams['legend.fontsize'] = plt.rcParams['font.size']
plt.rcParams['xtick.labelsize'] = plt.rcParams['font.size']
plt.rcParams['ytick.labelsize'] = plt.rcParams['font.size']
plt.rcParams['savefig.dpi'] = 2*plt.rcParams['savefig.dpi']
plt.rcParams['xtick.major.size'] = 3
plt.rcParams['xtick.minor.size'] = 3
plt.rcParams['xtick.major.width'] = 1
plt.rcParams['xtick.minor.width'] = 1
plt.rcParams['ytick.major.size'] = 3
plt.rcParams['ytick.minor.size'] = 3
plt.rcParams['ytick.major.width'] = 1
plt.rcParams['ytick.minor.width'] = 1
plt.rcParams['legend.frameon'] = False
plt.rcParams['legend.loc'] = 'best'
plt.rcParams['axes.linewidth'] = 1
plt.rcParams['text.usetex'] = True

In [10]:
fname = 'Data/RupeeVsDollar.txt'
# how to fix the date string so that it has 4 digits for the year?
df = pd.read_csv(fname, sep="\t")
#df = df.sort_values(by='Date')
df.head()


Out[10]:
Date Price Open High Low Change
0 Feb 73 7.52 7.52 7.52 7.52 -6.00%
1 Mar 73 7.55 7.55 7.55 7.55 0.40%
2 Apr 73 7.53 7.53 7.53 7.53 -0.26%
3 May 73 7.39 7.39 7.39 7.39 -1.86%
4 Jun 73 7.30 7.30 7.30 7.30 -1.22%

In [11]:
df.plot(y='Price', x='Date', figsize=(12,7))
plt.ylabel('Rupees per USD')
plt.show()



In [ ]:


In [ ]:


In [ ]: