Ben Chuanlong Du's Blog

It is never too late to learn.

Date and Time in Python pandas

Date/time utilities in the pandas module are more flexible/powerful than that in the datetime module. It is suggested that you use date/time utilities in the pandas module when you use DataFrame/Series in the pandas module.

  1. pandas.to_datetime works on an iterable object, handles missing values and nano seconds.

  2. pandas.Series.dt.strftime

Tips on PySimpleGUI

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

http://www.blog.pythonlibrary.org/2019/10/23/a-brief-intro-to-pysimplegui/

https://pysimplegui.readthedocs.io/en/latest/

Issues in pip and Solutions

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The issue is due to to pyopenssl using old dependencies. It can be fixed by removing the Python package cryptography package and then upgrading …

The Python Quit Unexpectedly Error

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

If you are using Homebrew, you can reinstall a corrupted Python environment like this:

brew uninstall --ignore-dependencies --force python python@2 unset PYTHONPATH brew install python python@2 I had another …