Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
new column with age interval pandas
Charmi Sapariya
Programming language:
Python
2021-06-11 02:23:05
0
Q:
new column with age interval pandas
Renegade Princess
Code:
Python
2021-06-04 22:06:10
df_ages['age_bins'] = pd.cut(x=df_ages['age'], bins=[20, 29, 39, 49])
0
Tags
new
int
pandas
age
Related
Renaming row value in pandas
how to give name to column in pandas
rename row pandas
pandas fill na with value from another column
Applies the f function to all Row of this DataFrame
pandas mutate new column
how to assign a new value in a column in pandas dataframe
add age categories pandas dataframe
initialize pandas dataframe with column names
pandas ttable with sum totals
create age-groups in pandas
how to fill nan values with mean in pandas
New to Communities?
Join the community