Package overview — pandas 2.2.2 documentation (2024)

pandas is a Python package providing fast,flexible, and expressive data structures designed to make working with“relational” or “labeled” data both easy and intuitive. It aims to be thefundamental high-level building block for doing practical, real-world dataanalysis in Python. Additionally, it has the broader goal of becoming themost powerful and flexible open source data analysis/manipulation toolavailable in any language. It is already well on its way toward this goal.

pandas is well suited for many different kinds of data:

  • Tabular data with heterogeneously-typed columns, as in an SQL table orExcel spreadsheet

  • Ordered and unordered (not necessarily fixed-frequency) time series data.

  • Arbitrary matrix data (hom*ogeneously typed or heterogeneous) with row andcolumn labels

  • Any other form of observational / statistical data sets. The dataneed not be labeled at all to be placed into a pandas data structure

The two primary data structures of pandas, Series (1-dimensional)and DataFrame (2-dimensional), handle the vast majority of typical usecases in finance, statistics, social science, and many areas ofengineering. For R users, DataFrame provides everything that R’sdata.frame provides and much more. pandas is built on top of NumPy and is intended to integrate well within a scientificcomputing environment with many other 3rd party libraries.

Here are just a few of the things that pandas does well:

  • Easy handling of missing data (represented as NaN) in floating point aswell as non-floating point data

  • Size mutability: columns can be inserted and deleted from DataFrame andhigher dimensional objects

  • Automatic and explicit data alignment: objects can be explicitlyaligned to a set of labels, or the user can simply ignore the labels andlet Series, DataFrame, etc. automatically align the data for you incomputations

  • Powerful, flexible group by functionality to performsplit-apply-combine operations on data sets, for both aggregating andtransforming data

  • Make it easy to convert ragged, differently-indexed data in otherPython and NumPy data structures into DataFrame objects

  • Intelligent label-based slicing, fancy indexing, and subsettingof large data sets

  • Intuitive merging and joining data sets

  • Flexible reshaping and pivoting of data sets

  • Hierarchical labeling of axes (possible to have multiple labels pertick)

  • Robust IO tools for loading data from flat files (CSV and delimited),Excel files, databases, and saving / loading data from the ultrafast HDF5format

  • Time series-specific functionality: date range generation and frequencyconversion, moving window statistics, date shifting, and lagging.

Many of these principles are here to address the shortcomings frequentlyexperienced using other languages / scientific research environments. For datascientists, working with data is typically divided into multiple stages:munging and cleaning data, analyzing / modeling it, then organizing the resultsof the analysis into a form suitable for plotting or tabular display. pandasis the ideal tool for all of these tasks.

Some other notes

  • pandas is fast. Many of the low-level algorithmic bits have beenextensively tweaked in Cython code. However, as withanything else generalization usually sacrifices performance. So if you focuson one feature for your application you may be able to create a fasterspecialized tool.

  • pandas is a dependency of statsmodels, making it an important part of thestatistical computing ecosystem in Python.

  • pandas has been used extensively in production in financial applications.

Data structures#

Dimensions

Name

Description

1

Series

1D labeled hom*ogeneously-typed array

2

DataFrame

General 2D labeled, size-mutable tabular structure with potentially heterogeneously-typed column

Why more than one data structure?#

The best way to think about the pandas data structures is as flexiblecontainers for lower dimensional data. For example, DataFrame is a containerfor Series, and Series is a container for scalars. We would like to beable to insert and remove objects from these containers in a dictionary-likefashion.

Also, we would like sensible default behaviors for the common API functionswhich take into account the typical orientation of time series andcross-sectional data sets. When using the N-dimensional array (ndarrays) to store 2- and 3-dimensionaldata, a burden is placed on the user to consider the orientation of the dataset when writing functions; axes are considered more or less equivalent (exceptwhen C- or Fortran-contiguousness matters for performance). In pandas, the axesare intended to lend more semantic meaning to the data; i.e., for a particulardata set, there is likely to be a “right” way to orient the data. The goal,then, is to reduce the amount of mental effort required to code up datatransformations in downstream functions.

For example, with tabular data (DataFrame) it is more semantically helpful tothink of the index (the rows) and the columns rather than axis 0 andaxis 1. Iterating through the columns of the DataFrame thus results in morereadable code:

for col in df.columns: series = df[col] # do something with series

Mutability and copying of data#

All pandas data structures are value-mutable (the values they contain can bealtered) but not always size-mutable. The length of a Series cannot bechanged, but, for example, columns can be inserted into a DataFrame. However,the vast majority of methods produce new objects and leave the input datauntouched. In general we like to favor immutability where sensible.

Getting support#

The first stop for pandas issues and ideas is the GitHub Issue Tracker. If you have a general question,pandas community experts can answer through Stack Overflow.

Community#

pandas is actively supported today by a community of like-minded individuals aroundthe world who contribute their valuable time and energy to help make open sourcepandas possible. Thanks to all of our contributors.

If you’re interested in contributing, please visit the contributing guide.

pandas is a NumFOCUS sponsored project.This will help ensure the success of the development of pandas as a world-class open-sourceproject and makes it possible to donate to the project.

Project governance#

The governance process that pandas project has used informally since its inception in 2008 is formalized in Project Governance documents.The documents clarify how decisions are made and how the various elements of our community interact, including the relationship between open source collaborative development and work that may be funded by for-profit or non-profit entities.

Wes McKinney is the Benevolent Dictator for Life (BDFL).

Development team#

The list of the Core Team members and more detailed information can be found on the pandas website.

Institutional partners#

The information about current institutional partners can be found on pandas website page.

License#

BSD 3-Clause LicenseCopyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development TeamAll rights reserved.Copyright (c) 2011-2023, Open source contributors.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.* Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package overview — pandas 2.2.2 documentation (2024)
Top Articles
What is a credit card surcharge? - NerdWallet Australia
How to Authenticate Git Push with Github Using a Token
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
Non Sequitur
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 6483

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.