我有一個包含 4 個特征和 2 個標簽(1 和 0)的數(shù)據(jù)集。有沒有辦法可以檢查該數(shù)據(jù)集的所有 1400 個標簽值并返回它屬于哪一行?第 0-3 列是特征,第 4 列是標簽值。import pandas as pdimport numpy as npimport matplotlib.pyplot as pltfrom sklearn.model_selection import train_test_splitdata = pd.read_csv('data_banknote_authentication.txt', header=None)print(data.head())print(data.tail())print(data.info)X = data.loc[:, :3]Y = data[4]
添加回答
舉報
0/150
提交
取消