Ad

Thursday, March 29, 2018

Python Pandas Data Science Manipulation Pandas Cheat Sheet

pandas.Series = (
 {key : value}
)

pandas.DataFrame  = (
{key : value},
{key : value},
{key : value},
index=[]
)

Add new column
pandas.DataFrame['col_name'] = value

     value can be a series of vectors or dictionary
     pd.Series({0:'first', 1:'second'})



placeholder strategy
df['feedback'] = ['+', None, '-']

turn index into auto incrementing default numbers
guaranteed unique
df.reset_index()


join dataframes

Pandas data types http://pandas.pydata.org/pandas-docs/stable/basics.html#dtypes

No comments:

Post a Comment

Applying for jobs at the Lending Club

We tried to figure out Lending Club 's tech stack for 2019. Our analysis shows Lending Club asks for skills in Python, Tableau, SQL and ...