import pandas as np from pandas import Series, DataFrame
dframe_final.to_csv('C:/Program Files/source/csv_data/2015/Merged files/jjj_all_merged.csv')
I have this part of my code and I need to add a new column at the end of this csv file and name it "New_name". And populate it based on different criteria:
For example, if cell1 is "a" and cell2 is "b" and cell3 is "1" and cell4 is "2 or 5" then enter "OK" If not, enter "NOT OK" or leave empty.
Column 1 Column 2 Column 3 Column 4 "New_name"
a b 1 2 "OK"
a b 1 5 "OK"
c d e f "NOT OK"
PLEASE HELP!!! :)