欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

利用dataset.columns为表格加表头

程序员文章站 2024-02-04 21:19:34
...
import pandas as pd
import numpy as np
dataset = pd.read_csv('wdbc.csv', header =None)
columns = ['mean radius', 'mean texture','mean perimeter', 'mean area','mean smoothness',
              'mean compactness','mean concavity','mean concave points','mean symmetry', 'mean fractal dimension',
              'radius error', 'texture error','perimeter error','area error','smoothness error',
              'compactness error','concavity error', 'concave points error','symmetry error', 'fractal dimension error',
              'worst radius', 'worst texture','worst perimeter', 'worst area','worst smoothness',
              'worst compactness','worst concavity', 'worst concave points','worst symmetry', 'worst fractal dimension','ill']
dataset.columns = columns
dataset

利用dataset.columns为表格加表头

相关标签: python