Feb-02-2019, 03:37 PM
maxd = sr.iloc[:1, 1:2] print(maxd) rdate 11623 2019-01-19 07:36:00All I want to print is 2019-01-19. No rdate, 11623, or 07:36:00
I have spent days with google trying to find the solution with no luck.
Gary
printing maxd = sr.iloc[:1, 1:2]
|
Feb-02-2019, 03:37 PM
maxd = sr.iloc[:1, 1:2] print(maxd) rdate 11623 2019-01-19 07:36:00All I want to print is 2019-01-19. No rdate, 11623, or 07:36:00 I have spent days with google trying to find the solution with no luck.
Gary
Feb-04-2019, 01:41 AM
You've described your output clearly but I'm not clear on your input, what what library you're implying with the syntax you're using. It's hard to say more at this point, but you might find https://docs.python.org/2/library/dateti...e.strftime useful.
Feb-04-2019, 05:56 AM
You probably need the following:
print(maxd.loc[11623, 'rdate'].strftime("%Y-%m-%d"))(Not tested)
Feb-04-2019, 12:28 PM
Yes I figured it out.
sd.rdate.min().strftime('From: %b %d %y') + ' - ' + sd.rdate.max().strftime('To: %b %d %y')),I have trouble when I should use sd.rdate or sd['radte']
Gary
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
loc / iloc / ix used with () or [] | JoeDainton123 | 0 | 1,659 |
Aug-04-2020, 12:27 PM Last Post: JoeDainton123 |