Python Forum
date format without time
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
date format without time
#3
(Jan-15-2018, 10:56 AM)buran Wrote: it's not an error - when you use () brackets in comprehension expression (line#3) it produce a generator. use [] in order to get a list
an error occurs >>
Error:
ip_table['DateB']=[datetime.strptime(ip_table['Date'], '%Y-%m-%d %H:%M').strftime('%Y-%m-%d') for ip_table['DateB'] in ip_table['Date']] TypeError: strptime() argument 1 must be str, not Series
i don't understand the argument error.
Reply


Messages In This Thread
date format without time - by issac_n - Jan-15-2018, 10:53 AM
RE: date format without time - by buran - Jan-15-2018, 10:56 AM
RE: date format without time - by issac_n - Jan-15-2018, 01:59 PM
RE: date format without time - by metulburr - Jan-15-2018, 02:19 PM
RE: date format without time - by issac_n - Jan-15-2018, 03:50 PM
RE: date format without time - by snippsat - Jan-15-2018, 03:59 PM
RE: date format without time - by issac_n - Jan-19-2018, 10:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] Load date/time from .txt to 'datetime64' type. water 4 403 Mar-01-2024, 11:16 PM
Last Post: Gribouillis
  Pandas read csv file in 'date/time' chunks MorganSamage 4 1,647 Feb-13-2023, 11:24 AM
Last Post: MorganSamage
  Does a pandas have a date without a time? AlekseyPython 6 4,865 Feb-10-2021, 09:24 AM
Last Post: Naheed
  replace nan values by mean group by date.year, date.month wissam1974 5 8,325 Feb-19-2020, 06:25 PM
Last Post: AnkitGupta
  Time Data does not match format AshBax 2 28,766 Nov-13-2018, 12:19 PM
Last Post: AshBax
  Finding date count from a list of date range in pandas trillerducas72 0 2,720 May-24-2018, 02:30 AM
Last Post: trillerducas72
  pandas convert date/time to week okl 3 6,629 Mar-03-2018, 10:15 PM
Last Post: marsokod
  is a pandas dataframe timeseries time index in a specified range (but ignoring date)? m_lotinga 4 19,078 Dec-12-2016, 10:51 PM
Last Post: m_lotinga

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020