i have a table that contains a column of numbers like (959, 1189...) when i check the column type i find it string type so i changed the type of column to integer type the problem is that when the column becomes integer type it shows null values that doesn't existed before instead of other values ( every number > 999 , for exemple 1232) this is how i'am changing the data type any help? : ```
from pyspark.sql.types import (
IntegerType
)
dfnumber2 = dfnumber \
.withColumn("Offres d'emploi" ,
dfnumber["Offres d'emploi"]
.cast(IntegerType())) \
dfnumber2.printSchema()
300and3,000). instead of overwriting the column, create a new column and filter a few records where the new column is null - then check what the actual values were in the input dataframe. you could also try usingbigintordoubledatatypes. if the column does contain commas, remove them before casting.