Apache Spark 1.3 发布
原文地址:https://databricks.com/blog/2015/03/13/announcing-spark-1-3.html
Apache Spark 1.3 版本引入了新的Data Frame API,对大数据集、结构化数据集的操作变得更快速和更容易。
代码示例:
# Constructs a DataFrame from a JSON dataset.
users = context.load("s3n://path/to/users.json", "json")
# Create a new DataFrame that contains “young users” only
young = users.filter(users.age < 21)
# Alternatively, using Pandas-like syntax
young = users
# DataFrame's support existing RDD operators
print("Young users: " + young.count())
Apache Spark 1.3 版本引入了新的Data Frame API,对大数据集、结构化数据集的操作变得更快速和更容易。
代码示例:
# Constructs a DataFrame from a JSON dataset.
users = context.load("s3n://path/to/users.json", "json")
# Create a new DataFrame that contains “young users” only
young = users.filter(users.age < 21)
# Alternatively, using Pandas-like syntax
young = users
# DataFrame's support existing RDD operators
print("Young users: " + young.count())
没有找到相关结果
已邀请:
0 个回复