Thank you Massa. I would like to know about df variable in for loop. I created multiple csv files. Now I would like read all csv. I have done by:
path='/home/System/PCA_1/' filenames = glob.glob(path + "/*.csv")
loop over the list of csv files
for f in filenames:
# read the csv file
df_1 = pd.read_csv(f, sep=';')
if df1.groupby("VARIETY").get_value("C61") OR .groupby("AGE").get_value("10"):
df.to_csv(f"/home/System/Marker_filter.csv")
I would like to mention the conditions on 5 columns in each file separately and make new file MARKER_filter.csv. I am not getting if statement on multiple columns in multiple csv file.
Try to print the results of
f"/home/System/table_{i}.csv"and see filename its trying to write to.Why is this tagged with
R?If I can get solution in R too