Pivot Table (pandas)

pandas

  • choose the row index, column index, value that are used for new DataFrame from original DataFrame’s column index + Use aggregation method → Make new DataFrame (pivot table)

Group (pandas)

pandas

  • 1st : split data by the specific standard (grouping)
  • 2nd : The methods for data aggregation or data change are applied to each group (Mapping applied to group : agg, transform, apply, filter)
  • 3rd : combine (Two Dataframe Connection posting)

Two Dataframe Connection (pandas)

pandas

  • concat
    • simple connection between 2 dataframe
  • merge
    • connection standard : common data on specific column → combine those records (df1 has n records & df2 has m records that have common data on specific column compared with counterpart df → Number of total intersection records is n x m)
  • join
    • connection standard : common row index
  • Option used for 3 methods
    • inner : intersection set
    • outer : union set (contains intersection set)
    • left : left set (contains intersection set)
    • right : right set (contains intersection set)

Filtering (pandas)

pandas

  • Extract the records which satisfy the condition from dataframe
  • Method
    • Boolean Indexing
    • isin

Pagination


© 2017. All rights reserved.

Powered by Hydejack v조현진