You have two dataframes and want to store them in a list based on shared values in one column. Below are two dataframes; one with movie ratings and the other with duration.
Movie rating dataframe
shape: (4, 2)
Movie
Rating
str
f64
"Inception"
8.8
"The Revenant"
8.0
"The Wolf of Wall Street"
8.2
"Revolutionary Road"
7.3
Movie duration dataframe
shape: (4, 2)
Movie
Duration
str
i64
"The Fall Guy"
126
"The Revenant"
156
"La La Land"
128
"Revolutionary Road"
119
Align dataframes and store in list
To create a list of dataframes that contain movies featuring Leonardo DiCaprio, you can use the Polars expression pl.align_frames like this: