Skip to content

Tag: dataframe

Manipulating DataFrame

I have the following dataframe df where there are 3 columns: Date, value and topic. I want to create a new dataframe df1 where the topic is the column and is indexed by day, and each topic has its own value per day. My problem is that I don’t know how to match the value to the topic per day.

importing for loop output to another for loop

I am facing problem while importing the output of a for-loop to another for loop. My python script Actually facing problem in this line of code e = {d[0]: c, d[1]:[2.0,2.0]}, where value of c should be different but by this script i am getting repeated value. Answer Your problem is that you keep over writting…