Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
datatype check
#1
Hello,
using synapse pipeline, I generate a .parquet file with data in columns such as HoseNo (Which contains numbers), ClientName (which contains text), etc.
In pyspark, I check for the type of the value in each column and it shows as str for every single field.
Do you know why I do not get number columns as integer datatypes?

example:
type(row["HouseNo"])
result:
Output:
<class 'str'>
p.s. I am unable to placed the above simple python code in code snipt using the button in the thread.

Thank you
Yoriz write Jan-18-2022, 10:26 AM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply
#2
It's pretty much impossible to answer without seeing your code, don't you think? Is it taking care to convert strings to numbers? Is it failing somewhere? Please don't make us guess!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to change the datatype of list elements? mHosseinDS86 9 2,021 Aug-24-2022, 05:26 PM
Last Post: deanhystad
  Error when Excelwriter saving a dataframe with datetime datatype with timezone klllmmm 3 13,480 Dec-08-2020, 11:37 AM
Last Post: Larz60+
  I need to get only string datatype and report in excel file. akshay3210 3 2,398 Dec-12-2019, 09:53 AM
Last Post: akshay3210
  Unable to read decimal datatype using pandasql geethchi 0 2,053 Oct-25-2019, 05:56 PM
Last Post: geethchi
  Add two number and variable datatype is int8 ift38375 3 2,940 Aug-05-2019, 05:41 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020