So, i've got this dataframe:
test_df = pd.DataFrame(data={'Season':['1996-97', '1997-98', '1998-99',
'1999-00', '2000-01', '2001-02',
'2002-03','2003-04','2004-05',
'2005-06','2006-07','2007-08',
'2008-09', '2009-10', '2010-11', '2011-12'],
'Height':np.random.randint(20, size=16),
'Weight':np.random.randint(40, size=16)})
The 'Season' column would be somthing like a "YYYY-YY" format (I think it does not exist in pandas), and it is recognized by pandas as a general object type. What I need is this column to be a Period with a daily frequency, but the season is from october 1 from the previous year (the YYYY part of the original data) to june 30 of the latter year (the -YY part). Is it possible?
I have tried converting it to a PerioIndex using the YYYY part of the original data, as in test_df['period'] = pd.PeriodIndex(test_df['Season'].str[:4], freq='A-MAR')
. It gave me a new 'period' column with a single year (like 1996, for eg.) starting at april 1 the previous year (1995 in the eg. case) and ending in march 31 the 'current' year (1996 in the eg. case). so the frequency was annualy, and not daily as I need it to be, and it consideres a full year, from January to december, not excluding some months as I need. Can the daily freq for a 'broken' year thing be done within pandas?