Cannot find col function in pyspark

前端 未结 6 1045
挽巷
挽巷 2020-12-02 12:23

In pyspark 1.6.2, I can import col function by

from pyspark.sql.functions import col

but when I try to look it up in the Githu

6条回答
  •  春和景丽
    2020-12-02 12:36

    In Pycharm the col function and others are flagged as "not found"

    a workaround is to import functions and call the col function from there.

    for example:

    from pyspark.sql import functions as F
    df.select(F.col("my_column"))
    

提交回复
热议问题