Concatenating variable amount of Pandas Dataframes

Viewed 35

I'm working on a script where I create dataframes filled with values from a Datawarehouse.

Now I want to append a variable number of those dataframes. The scenario could look like this: Based on the SQL-Query I get e.g. 14 dataframes. Controlled by an input-variable I want to append x of these dataframes to one. For example x=2: then I have 7 dataframes and each one contains 2 of the 14. Because I will always have some kind of date-information, I want to append them based on the Date. Like one dataframe covers today and the other covers yesterday, these two should be appended to each other. Then the two from the day before yesterday and the before and so on.

0 Answers
Related