apply ( clean_normalize_whitespace ) # Determine numeric types for each column col_type = ). applymap ( clean_normalize_whitespace ) df_GDP. Python MySQL Installer Import modules Python connecting to MySQL Python MySQL Fetch Data and store in a variable Create HTML Template Open a web browser. read_html ( '', match = 'Nominal GDP' ) df_GDP = table_GDP # Clean up the DataFrame and Columns df_GDP = df_GDP. strip () else : return x # Read in the Wikipedia page and get the DataFrame table_GDP = pd. Import pandas as pd import numpy as np from unicodedata import normalize def clean_normalize_whitespace ( x ): """ Normalize unicode characters and strip trailing spaces """ if isinstance ( x, str ): return normalize ( 'NFKC', x ).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |