Last active
August 29, 2015 14:27
-
-
Save sujayy1983/f1addcc1b00dda2c7762 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__= "Sujayyendhiren Srinivasamurthi" | |
__email__ = "sujayyendhiren.srinivasamurthi@fmr.com" | |
__description__ = """ | |
Manipulating dataframes, especially adding row to a dataframe. | |
""" | |
import numpy as np | |
import pandas as pd | |
df = pd.DataFrame(columns=['Apps', 'Data']) | |
df.to_csv('apps.csv', index=False) | |
df = pd.read_csv('apps.csv') | |
lRow1 = [['parser', 'Reserved']] | |
lRow2 = [['test_application', 'Reserved']] | |
df1 = pd.DataFrame(lRow1, columns=['Apps', 'Data'] ) | |
df2 = pd.DataFrame(lRow2, columns=['Apps', 'Data'] ) | |
df = df.append(df1, ignore_index=True) | |
df = df.append(df2, ignore_index=True) | |
df.to_csv('apps.csv', index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment