Category : Worknotes

painting a breathtaking aerial view of lakes and mountains

Example code about how to extract several date and time features from datetime variables with feature-engine. It can answer following questions: import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from feature_engine import transformation as vt # create range of monthly dates download_dates = pd.date_range(start=’2019-01-01′, end=’2020-01-01′, freq=’MS’) # ..

Read more

Finds files with a pattern in filenames from a directory or directories. Find one file. find /directory/ -name “tofindthisfile.txt” -print Find all files with pattern in filenames. find /directory/ -name “aa*bb*.png” -print Find files in several directories. find /directory1/ /direcotory2/ -name “aa*bb*.png&#82..

Read more

My example of Python code for mapping variables overlay with geographic information. Elements in the map include ocean, coastline,borders,lakes,rivers,province borders, contour, contourf, pcolormesh, scatter, labels, province (or state) names. Also includes information about how to set cmap, what range of the data (minimum, maximum) to show, how many levels to display the data. How to ..

Read more