Using two CSV files to assemble a single line chart

I would like to know if there is a way to create an animated graph in Plotly using two or more CSV files. I am trying to create an animation using a set of CSV files; however, when I run it, it only displays one CSV of data. In the documentation, I only saw examples using one CSV. Does anyone have any tips?

For example:

In this animation, I have two lines representing two variables, and instead of coming from the same CSV, I want them to come from two different ones. I cannot merge the two CSV files to display them because the CSV files I am working with are very large, which would result in a performance loss.

hi @gandalfr
:wave: Welcome to the community.
Every Plotly Express chart will take a data_frame as the first attribute. But I don’t think you can assign two datasets to that one attribute.

One way to use two csv files is to read them into your code with pandas, and then merge them into one pandas data frame. Then, use that dataframe in the animation.

Thanks :grinning:

I tried this approach, and it worked for a few CSV files, but when working with many, this approach doesn’t perform well. Is there any other path I can take?