Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Using the Python Package crypt¶
Format Python Code Using Black
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Installation
pip3 install -U black[jupter]
Usage
The following code formats Python files and Jupyter/Lab Notebooks under the current directory.
black ./
References
Read CSV Using Polars in Python
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Hands on the Polars Library in Python
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
polars.DataFrame.uniqueandpolars.Series.uniquedo not maintain the original order by default. To maintain the original order, pass the optionmaintain_order=True.
Polars¶
Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow as memory model.
Dealing With Environment Variables in Python
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
os.environis a dict-like object containing environment variables as keys and their values as values. You can query the value of an environment variable usingos.environ[ENV_VAR_NAME]. And you can set the value of an environemnt variable usingos.environ[ENV_VAR_NAME] = val
Rustdef Makes It Dead Simple to Call Rust in Python Notebook
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
- rustimport is a Python library which allows you to import Rust source files directly from Python! It is similar to rustdef @ GitHub but targeting use cases in Python code instead of in Jupyter/Lab notebooks.