NiceMicro on Nostr: #Python magicians of the Fediverse! What is the correct way of converting a datetime ...
#Python magicians of the Fediverse!
What is the correct way of converting a datetime column in #Pandas to my local timezone?
If I do:
```
songlist.head(15)["Time added"].dt.tz_localize("UTC").dt.tz_convert("Asia/Seoul")
```
I have to manually give my location in a string, and for some reason, the `tz_convert` command doesn't recognize "KST" which is what I get from `time.tzname`.
```
datetime.datetime.now().tzinfo
```
returns nothing. What to do?
#Programming #AskFedi
What is the correct way of converting a datetime column in #Pandas to my local timezone?
If I do:
```
songlist.head(15)["Time added"].dt.tz_localize("UTC").dt.tz_convert("Asia/Seoul")
```
I have to manually give my location in a string, and for some reason, the `tz_convert` command doesn't recognize "KST" which is what I get from `time.tzname`.
```
datetime.datetime.now().tzinfo
```
returns nothing. What to do?
#Programming #AskFedi