0

I have a dataframe that looks like this

......................
.Details..

I need to add another column (tempTot2) next to it and transfer the value '5' from TOTAL row to the newly created column next to "OOSLATotal" so it will look like this

enter image description here

Given that I have multiple vendors, this number will change based on vendor and will need to be grouped accordingly.

DannyK
  • 47
  • 8
  • What have you tried? What is the specific issue (adding a column, setting a value)? – Michael Butscher Jul 30 '20 at 13:49
  • Yes, basically I'm trying to copy the value next to TOTAL into a new column (tempTot2) next to "OOSLATotal" as shown in the second dataframe screen shot. Column creation is not an issue but copying the value in that specific place is. – DannyK Jul 30 '20 at 13:52
  • 1
    Does this answer your question? [Set value for particular cell in pandas DataFrame using index](https://stackoverflow.com/questions/13842088/set-value-for-particular-cell-in-pandas-dataframe-using-index) – Michael Butscher Jul 30 '20 at 13:58
  • I checked that but that only works when the value that is added is hardcoded. In their example, it was "10". However, in my data frame, I have multiple vendors and they will have different values based on the TOTAL field. – DannyK Jul 30 '20 at 14:12

0 Answers0