nickeubank / practicaldatascience_book

https://www.practicaldatascience.org/
7 stars 2 forks source link

Index reading visuals #15

Closed nickeubank closed 5 months ago

nickeubank commented 6 months ago

I think we'll want something about like this for index alignment reading:

IMG_8592

nickeubank commented 6 months ago

In code:

import pandas as pd
import numpy as np

pd.set_option("mode.copy_on_write", True)

df1 = pd.Series([1, 2, 3], index=["a", "b", "c"])
df2 = pd.Series([4, 5, 6], index=["b", "a", "c"])

df1 + df2
nickeubank commented 6 months ago

To go into https://github.com/nickeubank/practicaldatascience_book/blob/main/notebooks/class_3/week_3/07_indices.ipynb

kylebradbury commented 5 months ago

@nickeubank - what do you think? 3 3 7-indices

nickeubank commented 5 months ago

Color coding — brilliant. :)