I want to replace a column in a pandas dataframe with a portion of another column. What I have so far is:
for index, row in df.iterrows():
  File = df.at[row, 'FileName']
  df.at[row, 'NUMBER'] = File.split(".")[1]
Ideally, this will iterate through rows of the dataframe and replace the number column with a portion of the FileName column
I am getting the error:
ValueError: At based indexing on an integer index can only have integer indexers
and I think it has to do with the misuse of df.at[], but I am not sure how to fix it.
 
     
     
    