Hi @Ethn, The issue you are facing is likely because the field you are trying to convert to an integer contains commas. In many locales, commas are used as a thousand separator. So, when you try to convert a string with a comma to an integer, it will result in null values because it is not a valid character in an integer.
You can solve this problem by replacing the commas in your data with nothing, effectively removing them. Then, you can convert the resulting string to an integer. In PySpark, you can use the withColumn
function to create a new column based on an existing one, with transformations applied. You can use this function together with the expr
function to replace the commas and convert the string to an integer.