| thresh | Using thresh option of dropna() removing rows and columns |
| dropna | Delete NaN rows or columns |
| df.drop_duplicates | Delete Duplicate rows from DataFrame |
| duplicated | duplicate rows from DataFrame |
| Series.duplicated | duplicate value from Series |
| Series.drop_duplicates | Delete Duplicate data from Series |
| replace | Replace data |
| notnull | Check for Not Null and NaN data |
| fillna | Fill NA/NaN values |
| Validate Email address |
| dtypes | Pandas Data types |
| select_dtypes | Subset of DataFrame based on data type |
df['p_view']=df['p_view'].apply(lambda x: x.replace(',',''))
Converting to integer data type
df['p_view'] = df['p_view'].astype('int')
A regex which selects only characters in UTF-8, removing the rest, for each field in the dataframe.
df.replace({r'[^\x00-\x7F]+':''}, regex=True, inplace=True)
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.