Meet pandas
Meet pandas: Meet pandas: A Table You Can Program, Series: One Column of Values, DataFrames: Rows, Columns and the Index.
Updated
- Meet pandas: A Table You Can Program (Apprentice): pandas is the Python library for tables, imported as pd, and pd.DataFrame turns a list of dictionaries or a dictionary of lists into a DataFrame, so a question such as sales by store takes one line instead of a loop.
- Series: One Column of Values (Apprentice): A Series is pandas' column, one list of values with a label for each value (its index) and one dtype, and math such as price * 1.07 or sum, mean, max and round works on every value at once, with no loop.
- DataFrames: Rows, Columns and the Index (Apprentice): A DataFrame is pandas' table, and shape, columns and dtypes describe it, df['col'] picks one column as a Series, df[['a', 'b']] picks several as a smaller table, a new column can be made from two others in one line, and the index labels every row.