Questions et réponses pour le pyspark :

L'API Spark Python (PySpark) expose le modèle de programmation apache-spark à Python.

2
votes
J'ai un bloc de données Spark au format suivant. df = spark.createDataFrame([(1, 2, 3), (1, 4, 100), (20, 30, 50)],['a', 'b', 'c']) df.show() Entrée: ...

2
votes
J'ai le dataframe pyspark (df) ayant ci-dessous un exemple de tableau (table1): id, col1, col2, col3 1, abc, null, def 2, nul, def, abc 3, def, abc, null J'essaie d'obtenir une ...

2
votes
J'ai un Dataframe PySpark avec une colonne StringType () qui contient principalement 15 caractères. Cependant, certaines lignes comportent 11 caractères. Exemple: df.withColumn( ...

2
votes
J'ai un dataframe comme ci-dessous: dataframe.groupBy(col("id_doctor")) .agg( countDistinct(col("id_patient")).where(col("type_drug") == "bhd" & col("consumption") < ...