मराठी

Explain the difference between pivot() and pivot_ table() function?

Advertisements
Advertisements

प्रश्न

Explain the difference between pivot() and pivot_ table() function?

फरक स्पष्ट करा
Advertisements

उत्तर

Feature/Criteria pivot() Function pivot_table() Function
Duplicate Entries Cannot handle duplicates. It will crash and throw a ValueError if multiple rows have the same index/column identifier [pydata.org]. Handles duplicates smoothly. It aggregates matching data points together without crashing [pydata.org].
Data Aggregation Does not support aggregation [pydata.org]. Supports calculations using the aggfunc parameter (e.g., sum, mean, count) [pydata.org].
Default Calculation None (It simply reshapes the existing layout) [pydata.org]. Automatically computes the average (mean) of duplicate records [pydata.org].
Missing Values Has no built-in parameter to fill missing cells [pydata.org]. Includes the fill_value parameter to automatically replace empty cells (e.g., with 0) [pydata.org].
Grand Totals Cannot add row or column summary totals [pydata.org]. Includes the margins=True parameter to add custom row/column grand totals [pydata.org].
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 3: Data Handling using Pandas - II - Exercise [पृष्ठ १०२]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 12
पाठ 3 Data Handling using Pandas - II
Exercise | Q 2. | पृष्ठ १०२
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×