- 导入必要的库
from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
- 创建SparkSession
conf = SparkConf().setAppName("Financial Risk Control Data Analysis")
sc = SparkContext(conf=conf)
spark = SparkSession(sc)
- 读取数据
# 读取客户信息数据
customer_info =