mirror of
https://github.com/gsi-upm/sitc
synced 2024-11-22 06:22:29 +00:00
Corrected typo AgeFill instead of Age
This commit is contained in:
parent
5d682702ef
commit
01d8776295
@ -420,11 +420,11 @@
|
||||
"source": [
|
||||
"# Group ages to simplify machine learning algorithms. 0: 0-5, 1: 6-10, 2: 11-15, 3: 16-59 and 4: 60-80\n",
|
||||
"df['AgeGroup'] = 0\n",
|
||||
"df.loc[(.AgeFill<6),'AgeGroup'] = 0\n",
|
||||
"df.loc[(df.AgeFill>=6) & (df.AgeFill < 11),'AgeGroup'] = 1\n",
|
||||
"df.loc[(df.AgeFill>=11) & (df.AgeFill < 16),'AgeGroup'] = 2\n",
|
||||
"df.loc[(df.AgeFill>=16) & (df.AgeFill < 60),'AgeGroup'] = 3\n",
|
||||
"df.loc[(df.AgeFill>=60),'AgeGroup'] = 4"
|
||||
"df.loc[(.Age<6),'AgeGroup'] = 0\n",
|
||||
"df.loc[(df.Age>=6) & (df.Age < 11),'AgeGroup'] = 1\n",
|
||||
"df.loc[(df.Age>=11) & (df.Age < 16),'AgeGroup'] = 2\n",
|
||||
"df.loc[(df.Age>=16) & (df.Age < 60),'AgeGroup'] = 3\n",
|
||||
"df.loc[(df.Age>=60),'AgeGroup'] = 4"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user