Skip to content
Advertisement

Series Dataframe to List and Keeping Dates

This code outputs dates along with values as a series. I wanted to manipulate the values but I ended up losing the dates.

JavaScript

Series Dataframe:

Series to List:

How can I keep the dates along with the new values?

Advertisement

Answer

JavaScript
JavaScript
JavaScript
JavaScript

Notice that I used copy() so fgpd doesn’t get modified. The range is set to start in 1 because I don’t know how you plan to modify the first value.

Advertisement