get datatype of column using pyspark

前端 未结 6 429
野的像风
野的像风 2021-01-31 15:58

We are reading data from MongoDB Collection. Collection column has two different values (e.g.: (bson.Int64,int) (int,float) ).

I a

6条回答
  •  遇见更好的自我
    2021-01-31 16:23

    Looks like your actual data and your metadata have different types. The actual data is of type string while the metadata is double.

    As a solution I would recommend you to recreate the table with the correct datatypes.

提交回复
热议问题