Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 printing maxd = sr.iloc[:1, 1:2]
maxd = sr.iloc[:1, 1:2]
11623 2019-01-19 07:36:00
All 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.
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 useful.
Feel like you're not getting the answers you want? Checkout the help/rules for things like what to include/not include in a post, how to use code tags, how to ask smart questions, and more.

Pro-tip - there's an inverse correlation between the number of lines of code posted and my enthusiasm for helping with a question :)
You probably need the following:
print(maxd.loc[11623, 'rdate'].strftime("%Y-%m-%d"))
(Not tested)
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']

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)