LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Data Transformation with Polars

Kurs anzeigen

Anleitung zur Übung

  • Join hotels with type_benchmarks on type and beach, keeping all rows from both DataFrames.
  • Use coalesce=True to avoid duplicate join columns.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Keep all rows from both DataFrames
full_view = hotels.____(
    type_benchmarks,
    on=["type", "beach"],
    how="____",
    # Avoid duplicate columns
    coalesce=____
)

print(full_view.head())
Code bearbeiten und ausführen