I'm trying to automate a report by adding ordinal reference to items in a pandas dataframe or array
This is my data
0 [John]
1 [Jack, Tom]
2 [Eric, Chris, Bob]
This is prefered output
0 [Primary oncall: John]
1 [Primary oncall: Jack, Secondary oncall: Tom]
2 [Primary oncall: Eric, Secondary oncall: Chris, Third oncall: Bob]
I've tried without any luck to implement the following script https://rosettacode.org/wiki/Number_names#Python
Can someone please point me on how to accomplish this Thank you