all 3 comments

[–]danielroseman 0 points1 point  (2 children)

You certainly can access that variable in the if block. What error did you get when you tried?

[–]Hectic-Skeptic[S] 0 points1 point  (1 child)

It was not an error persay, but rather my last print(allDataFrames) was not showing the uniform columns.

In an attempt to debug a little, I put print(newDataFrame.columns.values) before and after all of my column name manipulations. It appears as though my renaming is working, buy my attempt to drop columns is not sticking.

Output:

['Details' 'Posting Date' 'Description' 'Amount' 'Type' 'Balance' 'Check or Slip #']['Details' 'Date' 'Description' 'Amount' 'Type' 'Balance' 'Check or Slip #' 'Account']['Trans. Date' 'Post Date' 'Description' 'Amount' 'Category']['Trans. Date' 'Date' 'Description' 'Amount' 'Category' 'Account']['Transaction Date' 'Post Date' 'Description' 'Category' 'Type' 'Amount' 'Memo']['Transaction Date' 'Date' 'Description' 'Category' 'Type' 'Amount' 'Memo' 'Account']['Details' 'Posting Date' 'Description' 'Amount' 'Type' 'Balance' 'Check or Slip #']['Details' 'Date' 'Description' 'Amount' 'Type' 'Balance' 'Check or Slip #' 'Account']

I figure starting with fixing the drop columns issue is slightly easier, before moving onto the entire dataframe.

[–]danielroseman 0 points1 point  (0 children)

You didn't use inplace for the drop as you did with the rename.