Posts

Showing posts with the label python pandas

Introduction to Series and DataFrames in Python Pandas| Data science full course free

Image
  In the  Introduction to Pandas  post, we learned about Pandas. In today's post we will learn Data Structures in Python Pandas. So, without consuming much time, let's jump to the introduction:- Data Structures in Pandas Python Pandas deals with 2 Data structures:- Series DataFrame Before the latest updates, Python had   3. Panel()   data structure which is used for the 3-D array. But Pandas has removed its   Panel()  and now it only has Series and DataFrame left. These data structures are built with NumPy which means they are fast. Dimension and Description of Data Structure The best way to think of these data structures is that the higher dimensional data structures is a container of its lower-dimensional data structure which means DataFrame is a container for   Series . Building and handling two or more dimensional array is tedious task, burden is placed on the user to consider the orientation of the Data Sets when writing functions. Mutability of the Data Structures 1. Valu

What is Series in Pandas? Data Science full course in Hindi for free | Codin India

Image
  Series is one-dimensional labeled array in Python Pandas which is capable of holding data of any type i.e. integer, float, characters, etc. The axis labels are collectively called index. How Series can be Created? It can be created using list, numpy arrays, from dictionaries, from scaler objects, etc. Let us explore it one by one. Syntax:- Import pandas as pd Pd.Series(data, index, dtype) Where pd is pandas alias, Series is Function through which we create it Series, data is the data we are creating, index is index of data and dtype is type of the data.       1. Create Series from  Python List:- Pandas Series can be created by Python List. We can create python list and there after call Python’s Pandas Series function to convert List into Series. Let us understand it by Code:-  Explanation:- First we imported modules and created a Python's list (list1). After that we called Pandas Series Function to convert Python List into Series. Here we have not passed any index, It will take a