Changing data types in Script Snap: Python

I got my first script snap to run successfully, but would like to change data types in specific columns. I could do this with a mapper snap I guess but would like to see it in the Script snap if anyone has an example.

Hey @ryan,

I’ve never done this, but a regular cast should work for the numbers for example. I did a quick sample in Python that includes changing string to int, and string to datetime, check it out:


DataTypes Change.slp (5.3 KB)

Let me know if this helps

@bojanvelevski Thank you, I got a script running with changes to datatypes right after I posted that. I was a little confused by the documentation but the standard python methods worked. I will definitely take a look at your example, the more I see the better. Thanks again.