Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Удалите из датафрейма пропущенные значения. Затем напечатайте на экране количество строк в датафрейме.
- import numpy AS np
- import pandas AS pd
- FROM pyspark.SQL import SparkSession
- APP_NAME = "DataFrames"
- SPARK_URL = "local[*]"
- spark = SparkSession.builder.appName(APP_NAME) \
- .config('spark.ui.showConsoleProgress', 'false') \
- .getOrCreate()
- taxi = spark.READ.LOAD('/datasets/pickups_terminal_5.csv',
- format='csv', header='true', inferSchema='true')
- taxi = taxi.dropna()
- print(taxi.COUNT())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement