kopia lustrzana https://github.com/animator/learn-python
Update Pandas_Series_Vs_NumPy_ndarray.md
rodzic
f87701802f
commit
7cd0ec140e
|
@ -6,7 +6,7 @@ Both NumPy ndarray and Pandas Series are essential tools for data manipulation i
|
|||
|
||||
## NumPy ndarray
|
||||
|
||||
NumPy is short form for Numerical Python, provides a powerful array object called `ndarray`, which is the backbone of many scientific and mathematical Python libraries. ndarray is also called n-dimensional array. Indexing in ndarray is integer based indexing.
|
||||
NumPy is short form for Numerical Python, provides a powerful array object called `ndarray`, It is very important for many scientific and mathematical Python libraries. ndarray is also called n-dimensional array. Indexing in ndarray is integer based indexing (like arr[0], arr[3], etc.).
|
||||
|
||||
Features of NumPy `ndarray`:
|
||||
|
||||
|
@ -31,11 +31,11 @@ Output:
|
|||
- When you need to perform mathematical operations on numerical data.
|
||||
- When you’re working with multi-dimensional data.
|
||||
- When computational efficiency is important.
|
||||
- When you need to store data of same data type. `
|
||||
- When you need to store data of same data type.
|
||||
|
||||
## Pandas Series
|
||||
|
||||
Pandas is a Python library used for data manipulation and analysis, introduces the `Series` data structure, which is designed for handling labeled one-dimensional data efficiently.
|
||||
Pandas is a Python library used for data manipulation and analysis, introduces the `Series` data structure, which is designed for handling labeled one-dimensional data efficiently. Indexing in Pandas Series is Label-based. It effectively handles heterogeneous data.
|
||||
|
||||
Features of Pandas `Series`:
|
||||
|
||||
|
@ -43,7 +43,7 @@ Features of Pandas `Series`:
|
|||
|
||||
- **Heterogeneous Data**: Unlike NumPy arrays, Pandas Series can hold data of different types (integers, floats, strings, etc.) within the same object.
|
||||
|
||||
- **Data Alignment**: One of the powerful features of Pandas Series is its ability to automatically align data based on label. This makes handling and manipulating data much more intuitive and less error-prone.
|
||||
- **Data Alignment**: One of the powerful features of Pandas Series is its ability to automatically align data based on label.
|
||||
|
||||
Example of creating a Pandas Series:
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue