import pandas as pd
import numpy as np

"""
Explanation: Select, Add, Delete, Columns
End of explanation
"""


cookbook_df = pd.DataFrame({'AAA' : [4,5,6,7], 'BBB' : [10,20,30,40],'CCC' : [100,50,-30,-50]})
cookbook_df['BBB']

"""
Explanation: dictionary like operations
dictionary selection with string index
End of explanation
"""


cookbook_df['BBB'] * cookbook_df['CCC']

"""
Explanation: arithmetic vectorized operation using string indices
End of explanation
"""


del cookbook_df['BBB']
cookbook_df

last_column = cookbook_df.pop('CCC')
last_column

cookbook_df

"""
Explanation: column deletion
End of explanation
"""


cookbook_df['DDD'] = [32, 21, 43, 'hike']
cookbook_df

"""
Explanation: add a new column using a Python list
End of explanation
"""


cookbook_df.insert(1, "new column", [3,4,5,6])
cookbook_df

"""
Explanation: insert function
documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.insert.html
End of explanation
"""


