Image by Author inspired by Loveascii

Photo by Author

Cowsay 🐮

import cowsay
cowsay.cow('Hello everybody!')

From Pixabay
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randn(20, 40))# Renaming columns
df.columns = [x for x in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN']
# Adding some missing values
df.iloc[3,4] = np.nan
df.iloc[2,0] = np.nan
df.iloc[4,5] = np.nan
df.iloc[0,6] = np.nan

From Unsplash

Removing spines

import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 1)
y = 2 * x
plt.plot(x, y)

From Unsplash

From Unsplash
import pandas as pd
dct = {'Oceania': 8.5, 'Europe': 10, 'Antarctica': 14.2, 'South America': 17.8,
'North America': 24.2, 'Africa': 30.4, 'Asia': 44.6}
continents = list(dct.keys())
populations = list(dct.values())

1. Bar plot

From Pixabay

1. is_unique

import pandas as pd
print(pd.Series([1, 2, 3, 4]).is_unique)
print(pd.Series([1, 2, 3, 1]).is_unique)

2 & 3. is_monotonic and is_monotonic_decreasing

print(pd.Series([1, 2, 3, 8]).is_monotonic)
print(pd.Series([1, 2, 3, 1]).is_monotonic)

Image by Author

Image by Author

Image by Author

Elena Kosourova

Petroleum Geologist passionate about Data Science. Linkedin:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store