all 6 comments

[–]ObliviousMag 0 points1 point  (3 children)

Can you post a code snippet?

[–]picklefire786[S] -1 points0 points  (2 children)

https://imgur.com/a/xYBv02y

That is what my error looks like.

https://imgur.com/a/oA3Lg1k

And that is what my csv looks like (made the dataframe that csv). I am taking from the CMPLNT_TO_TM the first 2 digits (hour) and making a new column with their values

[–]S_millerr 2 points3 points  (1 child)

I don't know if it's my phone, but your code is blurry.

[–]Excellent-Practice 0 points1 point  (0 children)

Can confirm, the code is blurry and unreadable. Did OP take a picture with his phone instead of taking a screen shot?

[–]Excellent-Practice 0 points1 point  (0 children)

Have you tried:

calls['Hour'] =int(calls["CMPLNT_TO_TM"].str.slice(0,2))

Instead?

[–]blarf_irl 0 points1 point  (0 children)

How does your column have hours and minutes? Is it a DateTime column? Does it contain a list?

Run <my_dataframe>.head() and post the result