79335964

Date: 2025-01-07 12:21:14
Score: 0.5
Natty:
Report link

One solution with Pandas:

# Stack to get the wanted format
df = df.stack().reset_index()
# Rename the columns
df.columns = ['Location', 'Species', 'number']
# Update the columns order 
df = df[df.columns.tolist()[::-1]]
# Order data by Species
df = df.sort_values('Species')
# Remove the index
df = df.reset_index(drop=True)

display(df)

df

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
Posted by: rehaqds