Hey all, I'm reading from a csv file, and despite...
# replication-troubleshooting
b
Hey all, I'm reading from a csv file, and despite setting the dtype, my connection still is reading all types as string. To make things simple, I tried to just set Reader Options to
{"dtype" : "object"}
to see if I was formatting something wrong. It still shows all strings in the connection though.
Screen Shot 2022-12-07 at 8.36.07 AM.png
Screen Shot 2022-12-07 at 8.37.15 AM.png
e
Hi. that is because object is a string. this is the code:
Copy code
number_types = ("int64", "float64")
        if current_type == "string":
            # previous column values was of the string type, no sense to look further
            return current_type
        if dtype == object:
            return "string"
        if dtype in number_types and (not current_type or current_type in number_types):
            return "number"
        if dtype == "bool" and (not current_type or current_type == "boolean"):
            return "boolean"
        return "string"
now you know what to do 🙂
🙏 1