1a
Run the cell of Step 1. It prints the schema of flights and of airports, and the number of columns of each. How many columns does each one have?
Check your output
root
|-- flight_date: ... (nullable = true)
|-- carrier: ...
...
root
|-- iata_code: ...
...
flights columns : <a whole number>
airports columns : <a whole number>One line per column, with its type and whether it can be null.
Show solutionHide solution
flights.printSchema()
airports.printSchema()
print("flights columns :", len(flights.columns))
print("airports columns :", len(airports.columns))