"from string import lower" doesn't work

Hi!
I was trying to do this task in jupyter, but when I try to import lower from string, I get an error, saying:

ImportError: cannot import name ‘lower’ from ‘string’

Is there anything extra I should import?

If I remember correctly that’s an option in Python2 which was deprected.

I think what you’re looking for could be done with df["column"].apply(str.lower) in Python3

2 Likes

Thanks a lot! it worked!

1 Like