Skip to content

Tag: python-3.x

How to read a day and time on the same line?

I was trying to reproduce the following entry in Python: 05 08:12:23. I did it as follows: Notice how there is a space after day and the split () I put to separate the numbers with ‘:’. How would I go about reading the day on the same input? Is there a better way to do this than what I’m

how to get dates from yahoo finance

I have a problem with getting the dates from yfinance into my matplotlib graph can somebody help/show me how to get the dates from yfinance into my matplotlib graph Answer Tested ✅ 🔰You could extract the date from ticker_history[observation] 🔰 It is a Pandas Series object, so here’s how I’d do it:…

Replacing values using dictionary

What are the reasons why are regex replacment doesn’t work? I have tried ensuring no excess spaces. When I do df.loc[df[‘column’]==”and another reason with her”] nothing has changed. Answer Please use df.replace(regex=dict)