Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

datetime

How to group a pandas dataframe by a defined time interval?

August 15, 2022 by Magenaut

I have a dataFrame like this, I would like to group every 60 minutes and start grouping at 06:30.

Categories Python, Q&A Tags datetime, group-by, pandas, python Leave a comment

unexpected results converting timezones in python

August 15, 2022 by Magenaut

I’m trying to understand why I’m getting these results when converting time zones to UTC:

Categories Python, Q&A Tags datetime, python, pytz, timezone Leave a comment

Python Pandas Group by date using datetime data

August 14, 2022 by Magenaut

I have a column Date_Time that I wish to groupby date time without creating a new column. Is this possible the current code I have does not work.

Categories Python, Q&A Tags dataframe, datetime, pandas, pandas-groupby, python Leave a comment

pd.Timestamp versus np.datetime64: are they interchangeable for selected uses?

August 14, 2022 by Magenaut

This question is motivated by an answer to a question on improving performance when performing comparisons with DatetimeIndex in pandas.

Categories Python, Q&A Tags arrays, datetime, numpy, pandas, python Leave a comment

Parsing datetime in Python..?

August 14, 2022 by Magenaut

I have a system (developed in Python) that accepts datetime as string in VARIOUS formats and i have to parse them..Currently datetime string formats are :

Categories Python, Q&A Tags datetime, format, python Leave a comment

How to read datetime back from sqlite as a datetime instead of string in Python?

August 14, 2022 by Magenaut

I’m using the sqlite3 module in Python 2.6.4 to store a datetime in a SQLite database. Inserting it is very easy, because sqlite automatically converts the date to a string. The problem is, when reading it it comes back as a string, but I need to reconstruct the original datetime object. How do I do this?

Categories Python, Q&A Tags datetime, python, sqlite Leave a comment

NameError: name ‘datetime’ is not defined

August 14, 2022 by Magenaut

I’m teaching myself Python and was just “exploring”. Google says that datetime is a global variable but when I try to find todays date in the terminal I receive the NameError in the question title?

Categories Python, Q&A Tags datetime, python Leave a comment

python – datetime with timezone to epoch

August 14, 2022 by Magenaut

In the code below, I am calculating now epoch and beginning of current day epoch.

Categories Python, Q&A Tags datetime, epoch, python, timezone Leave a comment

Python time to age, part 2: timezones

August 14, 2022 by Magenaut

is there a real way to do this with strptime?

Categories Python, Q&A Tags datetime, python, timezone Leave a comment

Convert date to datetime in Python

August 14, 2022 by Magenaut

Is there a built-in method for converting a date to a datetime in Python, for example getting the datetime for the midnight of the given date? The opposite conversion is easy: datetime has a .date() method.

Categories Python, Q&A Tags date, datetime, python Leave a comment
Older posts
Newer posts
← Previous Page1 … Page16 Page17 Page18 … Page20 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress