Finding gaps in both DataFrames
For data quality checks, you want to see all rows from both DataFrames - listings without benchmarks and benchmarks without listings. This helps identify gaps before analysis.
polars is loaded as pl, and the DataFrames hotels and type_benchmarks are available for you.
Latihan ini adalah bagian dari kursus
Data Transformation with Polars
Petunjuk latihan
- Join
hotelswithtype_benchmarksontypeandbeach, keeping all rows from both DataFrames. - Use
coalesce=Trueto avoid duplicate join columns.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
# Keep all rows from both DataFrames
full_view = hotels.____(
type_benchmarks,
on=["type", "beach"],
how="____",
# Avoid duplicate columns
coalesce=____
)
print(full_view.head())