'Separate Academic year from the given format

i used the following code to separate academic year data set given: Academic year 2016/2017 i want it as start year, end year 2016 2017 for two columns

df['years'] = pd.DatetimeIndex(df['Academic year']).years this shows unknown string format



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source