Coming along in the Pandas learning and am hitting a bit of a wall. My code is WORKING (thanks to you guys) but the output isn't "perfect".
I'd like to have the pandas output without the index being displayed AND the types not shown in my output. I've tried dropping the index from the read CSV, however, the csv is being read real-time from a web URL....which is the only thing I can think of as to what the issue is?
Code:
date_srch = "12/22/2021"
date_mask = pwrDF['Draw Date'] == date_srch
date_match = pwrDF.loc[date_mask, "Work Hours"]
date_match = date_match.str.replace(" ", ",")
if len(pwrDF[(pwrDF[ 'Draw Date' ] == date_srch)]) >0:
print('The Work Hours for this date are ', date_match)
else:
print('No work hours on this date')
Output: The Work Hours for this date are 182 07,16,19,48,68,15 Name: Winning Numbers, dtype: object
All I want is the following output: The Work Hours for this date are 07,16,19,48,68,15