Ask for a method of data analysis with python

ask the gods for help.

original data:
1 192.168.106.10
1 192.168.106.16
3 192.168.106.11
2 192.168.106.3
2 192.168.106.8
2 192.168.106.6

how to reorder the combination and return it into a dictionary in the following format:
{1: [192.168.106.10192.168.106.16] 2: [192.168.106.3192.168.106.8192.168.106.6] 3Rover 192.168.106.11}

Nov.26,2021

import pandas as pd

data = pd.read_csv('data.txt', sep=' ', header=None)

print(data.groupby(0).agg(lambda x: list(x))[1].to_dict())
Menu