WorkerGuy21
WorkerGuy21

Reputation: 34

How to convert single pandas dataframe column from log values (log10) back to normal values

I have a simple pandas dataframe consisting of a date interval column and a column of values (RRP_SA) as depicted in the snippet below. They are stored in a pandas dataframe (df_forecast). How can I take the 'RRP_SA' column, convert the entire column from log10 to normal format (as it is currently in log10 format), and then add this as a new column to the 'df_forecast' dataframe.

Pandas Dataframe layout

Upvotes: 0

Views: 680

Answers (1)

Federico
Federico

Reputation: 781

you should be able to do this using the following command:

df_forecast["value"] = 10 ** df_forecast["RRP_SA"]

as it is explained in this answer

Upvotes: 2

Related Questions