How to display Chinese characters in Matplotlib with Windows/Jupyter

I asked ChatGPT to generate a sample list of Tang Dynasty Poets from the book of 300 poems. It gave me this – it had some duplicates and one Song Dynasty poet in it. import pandas as pd data = [ {“English Name”: “Li Bai”, “Chinese Name”: “李白”, “Dates”: “701-762”}, {“English Name”: “Du Fu”, “Chinese Name”: “杜甫”, “Dates”: “712-770”}, {“English […]

Pandas – convert from dataframe append to concat.

the latest Pandas gives warning about append being depreciated. FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.   The main difference is that concat expects an iterable list. monnth_df = pd.concat( [ month_df,obs1 ], ignore_index=True) # month_df = month_df.append(obs1, ignore_index=True)  

Pandas – how to edit columns for html table

How to edit table so that index and column names are on the same row. import beatifulsoup. from bs4 import BeautifulSoup find the empty tags in ‘thead’ and then fill with col names from the dataframe. Note: If you code “header=False”, the default style for table row will be gone <tr style=”text-align: right;”> html_doc = tide_table.to_html(header=False) soup = BeautifulSoup(html_doc, ‘html.parser’) […]

Windows – how to start Jupyter notebook without anaconda

So, you pip installed Jupyter.  Thinking – hey don’t have to start up Anaconda environment to run it. C:\Users\jonallen\Documents\github\weather_obs>pip install jupyter Collecting jupyter Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB) Collecting ipywidgets Downloading ipywidgets-7.6.3-py2.py3-none-any.whl (121 kB) |████████████████████████████████| 121 kB 3.3 MB/s Collecting notebook Downloading notebook-6.4.3-py3-none-any.whl (9.9 MB) |████████████████████████████████| 9.9 MB 234 kB/s Collecting jupyter-console Downloading jupyter_console-6.4.0-py3-none-any.whl (22 kB) Collecting nbconvert Downloading nbconvert-6.1.0-py3-none-any.whl (551 […]