Creating a Column of Random Numbers in a DataFrame
Python
Data Preprocessing
1| import numpy as np 2| 3| # creates a column of random decimal numbers between 0 and 1 4| df['random'] = np.random.rand(len(df),1) 5| 6| # creates a column of random integers between 10 and 30 7| df['random_integer'] = np.random.randint(low=10, high=30, size=len(df))
4
4
3
3
2
How to Remove Punctuation From Text with Python
Python
Data Preprocessing
Nlp | String | Punctuation
2
2
How to Create Different Aggregations Using GroupBy, Agg & Dictionaries
Python
Data Preprocessing
2
2
2