Skip to content

ZosoV/pandas_review

Repository files navigation

Pandas Review

I plan to review the following topics that I supposed are the minimal for a job interview.

Contents

Topic Link Functions of Interest
Introduction to Pandas: Series, DataFrame, and Basics Data Structures: pd.Series(), pd.DataFrame()
Handy Functions: df.to_numpy(), df.index, df.columns, df.set_index(), df.reset_index(), df.rename()
Iteration: items(), iterrows(), itertuples()
Data Manipulation: Indexing, Slicing, and Filtering Indexing and Slicing: df[<column_name>],.loc[], .iloc[]
Filtering: conditional indexing (as numpy)
Conditional Filling Data: .where()
Data Manipulation: Multi-index Multi-index Structure: index, columns, axis, and levels
Creation: .from_arrays(), .from_tuples(), .from_product()
Indexing and Slicing:
    .loc[<tuple1>,<tuple2>]
    .loc[<list of tuples>] (or slicing), .loc[<tuple of lists>]
    .loc[<label_on_first_level>],df.loc(axis = 0)[], .xs()
Functions of Interest:
    set_index() and reset_index() can work together
    reindex()
    swaplevel() and reorder_levels()
    rename, rename_axis, index.set_names, .set_axis()
Data Manipulation: Inserting, Deleting, Sorting Inserting: using accesor, .insert()
Deleting: .drop(), .del, .pop()
Sorting: .sort_index(), .sort_values()
Data Manipulation: Concatenation, Merging and Compare Concatenation: concat() (multiple parameters)
Merging: merge(), join() (multiple parameters)
Comparing: compare()
Grouping Operations: Aggregation, Transformation and Filtering Splitting: groupby()
Applying: aggregate(), transform(), filter(), apply() (can use built-in and UDF functions)
Data Manipulation: Reshaping pivot(), pivot_table(), stack(), unstack(), melt()
Windowing Operations .rolling(), .expanding(), .ewm()
Properties: min_periods, center, closed, .apply(), corr(), cov()
Data Cleaning: Handling Missing Data (Optional)
Time Series Analysis (Optional)
Data Manipulation: Arithmetic Operations (Optional)
Performance Optimization (Optional)
Visualization (Optional)

References

I edit, organize, and add more examples to the content of this review is such a way that it is more understandable. However, it is important to mention that this review is based on three main sources:

  1. The official pandas user guide
  2. A real python review: The pandas DataFrame: Make Working With Data Delightful
  3. A medium article: Pandas Illustrated: The Definitive Visual Guide to Pandas

Releases

No releases published

Packages

No packages published