pyspark convert float results to integer replace
data_df = data_df.withColumn("Plays", data_df["Plays"].cast(IntegerType()))
pyspark convert float results to integer replace
data_df = data_df.withColumn("Plays", data_df["Plays"].cast(IntegerType()))
pyspark cast column to long
changedTypedf = joindf.withColumn("label", joindf["show"].cast("double"))
// types = ['BinaryType', 'BooleanType', 'ByteType', 'DateType',
// 'DecimalType', 'DoubleType', 'FloatType', 'IntegerType',
// 'LongType', 'ShortType', 'StringType', 'TimestampType']
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us