Just learning python, encounteringTo a question like this: Group the data in the table below, according to the historical storm_number on the left, and group those with the same number into a group.Lines 1 to 8 are grouped into a group, lines 9 to 15 are grouped into a group, and lines 16 to 22 are grouped into a group.Using pandas to read, Num is all numbers, Lon is all longitudes, and Lat is all latitudes.
df=pd.read_excel(filename,sheet_name='Sheet1')
Num = df['historical storm_number']
Lon = df['historical storm_longitude(°)']
Lat = df['historical storm_latitude(°)']
The result I want to achieve: It can be divided into Num1, Num2, Num3 according to the different numbers, the corresponding Lon is also divided into Lon1, Lon2, Lon3, and Lat is also divided into Lat1, Lat2, Lat3