Skip to content
Advertisement

Is there any function to get multiple timeseries with .get and create a dataframe in Pandas?

I get multiple time series data in series format with datetimeindex, which I want to resample and convert to a dataframe with multiple columns with each column representing each time series. I am using separate functions to create the dataframe, for example, .get(), .resample(), pd.concat(). Since it is not following the DRY principle (Don’t Repeat Yourself) and I can be categorized as a novice programmer, it would be really appreciated if an efficient method is suggested. I am giving some snippets below:

JavaScript

Advertisement

Answer

Although, you haven’t provided the df yet but this piece of code would definitely help:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement