# création d'un RDD sur le fichier personnes.csv fichier = sc.textFile("hdfs:/tmp/personnes.csv") tableau = fichier.map(lambda ligne: ligne.split(";")) # définition du schéma champ1 = StructField("nom", StringType) champ2 = StructField("prenom", StringType) champ3 = StructField("age", IntType) schema = [champ1, champ2, champ3] # création d'un DataFrame sur le RDD personnes = sqlContext.createDataFrame(tableau, schema)