06 2021 档案
摘要:1.scikit-learn库实现K-means算法 import pandas as pd from sklearn.cluster import KMeans import matplotlib.pyplot as plt "通过pandas导入相关数据" df = pd.read_csv(r'
阅读全文
摘要:1.将其他类型数据写入DataFrame (1)列表 1.元素为数字a = [1,2,3] df1 = pd.DataFrame(a) df1 结果: 0 0 1 1 2 2 3 2.元素为元组a = [(1,2,3),(1,2),(1,3,4,5)] df1 = pd.DataFrame(a) d
阅读全文