I am new to spark. I had parsed csv file into a dataframe. I am not able to select certain columns from the data frame. Following is the schema of my table: root
|-- _c0: integer (nullable = true)
|-- id: integer (nullable = true)
|-- track_name: string (nullable = true)
|-- size_bytes: long (nullable = true)
|-- currency: string (nullable = true)
|-- price: double (nullable = true)
|-- rating_count_tot: integer (nullable = true)
|-- rating_count_ver: integer (nullable = true)
|-- user_rating: double (nullable = true)
|-- user_rating_ver: double (nullable = true)
|-- ver: string (nullable = true)
|-- cont_rating: string (nullable = true)
|-- prime_genre: string (nullable = true)
|-- sup_devices.num: integer (nullable = true)
|-- ipadSc_urls.num: integer (nullable = true)
|-- lang.num: integer (nullable = true)
|-- vpp_lic: integer (nullable = true)
|-- Gigabytes: double (nullable = true)
While I am able to select some of the columns but when I am trying to select a column "ipadSc_urls.num" (one of the columns in the dataframe), I am getting an error.
Try to enclose column name in backquotes(`).
my_df.select('`ipadSc_urls.num`').show()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With