March 2020
Beginner to intermediate
352 pages
8h 40m
English
Let's perform a combined exploration of both types of dataframes. Do you remember how we can merge dataframes? If not, I highly recommend pausing here and quickly skimming through Chapter 6, Grouping Datasets:
df_wines = pd.concat([df_red, df_white])
df_wines = df_wines.sample(frac=1.0, random_state=42).reset_index(drop=True)
Note that the drop=True argument resets the indexes to the default integer index.
df_wines.head()
The output of the preceding code is given as follows:
Read now
Unlock full access