Skip to content

Commit b25e436

Browse files
committed
pep 8 compliance
1 parent 43fd10a commit b25e436

File tree

1 file changed

+5
-4
lines changed
  • examples/src/main/python

1 file changed

+5
-4
lines changed

examples/src/main/python/sql.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@
2626
sqlContext = SQLContext(sc)
2727

2828
# RDD is created from a list of rows
29-
some_rdd = sc.parallelize([Row(name="John", age=19), Row(name="Smith",
30-
age=23), Row(name="Sarah", age=18)])
29+
some_rdd = sc.parallelize([Row(name="John", age=19),
30+
Row(name="Smith", age=23),
31+
Row(name="Sarah", age=18)])
3132
# Infer schema from the first row, create a SchemaRDD and print the schema
3233
some_schemardd = sqlContext.inferSchema(some_rdd)
3334
some_schemardd.printSchema()
3435

3536
# Another RDD is created from a list of tuples
3637
another_rdd = sc.parallelize([("John", 19), ("Smith", 23), ("Sarah", 18)])
3738
# Schema with two fields - person_name and person_age
38-
schema = StructType([StructField("person_name", StringType(), False),
39-
StructField("person_age", IntegerType(), False)])
39+
schema = StructType([StructField("person_name", StringType(), False),
40+
StructField("person_age", IntegerType(), False)])
4041
# Create a SchemaRDD by applying the schema to the RDD and print the schema
4142
another_schemardd = sqlContext.applySchema(another_rdd, schema)
4243
another_schemardd.printSchema()

0 commit comments

Comments
 (0)