Skip to content
Course notes: Introduction to PySpark
  • AI Chat
  • Code
  • Report
  • add text here

    import pyspark
    
    spark = pyspark.sql.SparkSession.builder.getOrCreate()
    
    # datasets paths
    airports_path = "datasets/airports.csv"
    
    df_airports = spark.read.csv(airports_path)
    df_airports_ai.printSchema()