TIL

Today I Learned

Introduction: TIL

Managing path using pathlib in Python

Published:
Summary: It is a convinient package to manage path and files

Deal with Rare Categories Using Pandas

Published:
References: - pandas.DataFrame.mask
Summary: Deal with rare categories using pandas

Binning Data Values using Pandas

Published:
Category: { programming } { basics }
References: - pandas.cut
Summary: Convert continuous values into bins in pandas

Three dots in Python

Published:
Tags:
Summary: Use three dots as placeholder for python empty function

Python Class Sequential Inheritance

Published:
Summary: Sequentially inherit python classes

Ordered Member Functions of a Class in Python

Published:
Summary: Build an ordered list of methods in a python class by adding attributes to member functions

Postgres Optimization in JOIN

Published:
Summary: Join tables together starting with the smallest table (table with less cardinality) speeds things up.

Deal with NULL in Postgres

Published:
Summary: Please deal with null carefully.

Pandas Groupby Does Not Guarantee Unique Content in Groupby Columns

Published:
Summary: Pandas Groupby Does Not Guarantee Unique Content in Groupby Columns, it also considers the datatypes. Dealing with mixed types requires additional attention.

== and is in Python

Published:
Category: { programming } { basics }
Tags:
Summary: == and is are different

Switch statement in Python

Published:
Category: { programming } { basics }
Tags:
Summary: Love switch statement? We can design a switch statement it in python.

Python Tilde Operator

Published:
Category: { programming } { basics }
Tags:
Summary: tilde operator may not work as you expected

Arrays and Dicts in MongoDB

Published:
Category: { programming }
Summary: Array of dictionaries becomes hard to update in MongoDB.

eval in Python is Dangerous

Published:
Category: { programming } { basics }
Tags:
Summary: eval is powerful but really dangerous

Materialize the Query Result for Performance

Published:
Summary: Materialize the query result for multistage queries to make your query faster and lower the costs.

Get Current User in BigQuery

Published:
Summary: BigQuery Current User

Generate a Column of Continuous Dates in BigQuery

Published:
Summary: Generate a table with a column of continuous dates

Calculate Moving Average Using SQL/BigQquery

Published:
Summary: Snippet for calculating moving avg using sql/biguqery

BigQuery Meta Tables

Published:
Summary: Meta tables are very useful when it comes to get bigquery table information programmatically.

Auto-reload Python Packages or Python Modules in Jupyter Notebook

Published:
Category: { programming }
Summary: Python package or python module autoreloading in jupyter notebook