hdfs保存csv文件,里面含有多行列标题,验证需要用header=False,否则,显示不了;

dfh1 = sqlContext.read.csv(myfeature_path + 'shixin_com_prob_hydm.csv', header=False)
    dfh1.show()
    dfh1.createOrReplaceTempView('base')
    print(dfh1.count())
    res = sqlContext.sql(''' select * from base where _c0 != 'company_name' ''')

猜你喜欢

转载自blog.csdn.net/sinat_26566137/article/details/80540851