In [10]:
from pandas import DataFrame, read_csv

import matplotlib.pyplot as plt 
import pandas as pd 
import sys 

%matplotlib inline

In [11]:
print 'Python version ' + sys.version
print 'Pandas version ' + pd.__version__


Python version 2.7.6 | 64-bit | (default, Sep 15 2014, 17:36:35) [MSC v.1500 64 bit (AMD64)]
Pandas version 0.15.2

In [12]:
names = ['Bob', 'Jessica', 'Mary', 'John', 'Mel']
births = [968, 155, 77, 578, 973]

In [13]:
zip?

In [14]:
BabyDataSet = zip (names, births)
BabyDataSet


Out[14]:
[('Bob', 968), ('Jessica', 155), ('Mary', 77), ('John', 578), ('Mel', 973)]

In [17]:
df = pd.DataFrame (data = BabyDataSet , columns = ['Names', 'Births'])
df


Out[17]:
Names Births
0 Bob 968
1 Jessica 155
2 Mary 77
3 John 578
4 Mel 973

In [18]:
df.to_csv?

In [24]:
df.to_csv('C:\\Users\\vietnguyen\\Dropbox\\iPython notebooks\\births1880.csv', index=False, header=False)


---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-24-53484577227c> in <module>()
----> 1 df.to_csv('C:\\Users\\vietnguyen\\Dropbox\\iPython notebooks\\births1880.csv', index=False, header=False)

C:\Users\Viet Nguyen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pandas\util\decorators.py in wrapper(*args, **kwargs)
     86                 else:
     87                     kwargs[new_arg_name] = new_arg_value
---> 88             return func(*args, **kwargs)
     89         return wrapper
     90     return _deprecate_kwarg

C:\Users\Viet Nguyen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pandas\core\frame.py in to_csv(self, path_or_buf, sep, na_rep, float_format, columns, header, index, index_label, mode, encoding, quoting, quotechar, line_terminator, chunksize, tupleize_cols, date_format, doublequote, escapechar, **kwds)
   1174                                      doublequote=doublequote,
   1175                                      escapechar=escapechar)
-> 1176         formatter.save()
   1177 
   1178         if path_or_buf is None:

C:\Users\Viet Nguyen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pandas\core\format.py in save(self)
   1377         else:
   1378             f = com._get_handle(self.path_or_buf, self.mode,
-> 1379                                 encoding=self.encoding)
   1380             close = True
   1381 

C:\Users\Viet Nguyen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pandas\core\common.py in _get_handle(path, mode, encoding, compression)
   2714                 f = open(path, mode, errors='replace')
   2715         else:
-> 2716             f = open(path, mode)
   2717 
   2718     return f

IOError: [Errno 2] No such file or directory: 'C:\\Users\\vietnguyen\\Dropbox\\iPython notebooks\\births1880.csv'

In [21]:
pwd


Out[21]:
u'C:\\Users\\Viet Nguyen\\AppData\\Roaming\\Enthought\\Canopy\\ipython_notebooks'

In [ ]: