【发布时间】:2021-01-21 22:32:24
【问题描述】:
我有以下数据,想组合以下列来创建一个新的二进制,no = 0 和 yes = 1。我想组合到新列中的特征是:
曾经告诉过你患有充血性心力衰竭,曾经告诉过你患有冠心病, 曾经告诉过你有心绞痛/心绞痛,曾经告诉过你心脏病发作,曾经告诉过你中风
Age in years at screening 15881 non-null float64
Race/Hispanic origin 15881 non-null object
Ratio of family income to poverty 15881 non-null float64
Gender 15881 non-null object
year 15881 non-null object
60 sec. pulse (30 sec. pulse * 2) 15881 non-null float64
Weight (kg) 15881 non-null float64
Standing Height (cm) 15881 non-null float64
Waist Circumference (cm) 15881 non-null float64
Arm Circumference (cm) 15881 non-null float64
Ever told had congestive heart failure 15881 non-null object
Ever told you had coronary heart disease 15881 non-null object
Ever told you had angina/angina pectoris 15881 non-null object
Ever told you had heart attack 15881 non-null object
Ever told you had a stroke 15881 non-null object
Do you now smoke cigarettes? 15881 non-null object
Doctor told you have diabetes 15881 non-null object
How often drink alcohol over past 12 mos 15881 non-null float64
Sodium (mmol/L) 15881 non-null float64
Cholesterol, refrigerated serum (mg/dL) 15881 non-null float64
avg_systolic_blood_pres 15881 non-null float64
avg_diastolic_blood_pres 15881 non-null float64
我还担心我最终可能会得到比原始数据集更多的数据(15881 行,22 列)
【问题讨论】:
标签: python pandas machine-learning binary classification