Pandas select unique values from column

前端 未结 2 909
暖寄归人
暖寄归人 2020-12-19 03:49

I was able to ingest a csv in jupyter notes by doing this :

csvData= pd.read_csv(\"logfile.csv\")

My data looks like this:

         


        
2条回答
  •  北荒
    北荒 (楼主)
    2020-12-19 04:43

    You need to select the column correctly then apply unique

    csvData['ip'].unique().tolist()
    Out[677]: ['111.111.111.111', '222.222.222.222']
    

提交回复
热议问题