https://sparkbyexamples.com/pyspark/pyspark-cast-column-type/
lør. 2. apr. 2022 kl. 04:10 skrev ayan guha <guha.a...@gmail.com>: > Please use cast. Also I would strongly recommend to go through spark doco, > its pretty good. > > On Sat, 2 Apr 2022 at 12:43 pm, <capitnfrak...@free.fr> wrote: > >> Hi >> >> I got a dataframe object from other application, it means this obj is >> not generated by me. >> How can I change the data types for some columns in this dataframe? >> >> For example, change the column type from Int to Float. >> >> Thanks. >> >> --------------------------------------------------------------------- >> To unsubscribe e-mail: user-unsubscr...@spark.apache.org >> >> -- > Best Regards, > Ayan Guha > -- Bjørn Jørgensen Vestre Aspehaug 4, 6010 Ålesund Norge +47 480 94 297