So here's the scenario:
- I have a csv column that stores users points
- I am able to alter the user's 'points
- After changing them, I would like to replace the old score with the new altered one
How can I update this value?
So here's the scenario:
How can I update this value?
Make pandas data frame which takes 5 row's and 2 columns as input for example:-
import pandas as pd
res = pd.DataFrame(columns=('col1', 'col2'))
for i in range(5):
res_list = list(map(int, input().split()))
res = res.append(pd.Series(res_list,index=['col1','col2']), ignore_index=True)
df.to_csv('example.csv', index=False,, header=False)
index
and header
values are according to your choice