{"id":4757,"date":"2020-09-09T14:57:05","date_gmt":"2020-09-09T09:27:05","guid":{"rendered":"https:\/\/www.h2kinfosys.com\/blog\/?p=4757"},"modified":"2020-09-09T14:57:07","modified_gmt":"2020-09-09T09:27:07","slug":"getting-started-with-pandas","status":"publish","type":"post","link":"https:\/\/www.h2kinfosys.com\/blog\/getting-started-with-pandas\/","title":{"rendered":"Getting Started with Pandas"},"content":{"rendered":"\n<p>Pandas is a popular Python package for data science, and with good reason, it offers powerful, expressive, and flexible data structures that make data manipulation and analysis easy, among many other things. The DataFrame is one of these structures.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Pandas ?<\/strong><\/h2>\n\n\n\n<p>Pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with \u201crelational\u201d or \u201clabeled\u201d data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real-world data analysis in Python. Additionally, it has the broader goal of becoming the most powerful and flexible open-source data analysis &amp; data manipulation tool available in any language.<\/p>\n\n\n\n<p>Pandas is well-suited for many different kinds of data:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Tabular data with heterogeneously-typed columns, as in an SQL table or Excel spreadsheet<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Ordered and unordered (not necessarily fixed-frequency) time-series data.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.quora.com\/What-is-an-arbitrary-matrix\" rel=\"nofollow noopener\" target=\"_blank\">Arbitrary matrix data<\/a> (homogeneously typed or heterogeneous) with row and column labels<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Any other form of observational\/statistical data sets. The data actually need not be labeled at all to be placed into a pandas data structure<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Pandas Data Structures<\/strong><\/h2>\n\n\n\n<p>There are two types of data structures in pandas<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Series &#8211; 1D labeled homogeneously-typed array<\/li><\/ol>\n\n\n\n<p>2. &nbsp; DataFrame &#8211; General 2D labeled, size-mutable tabular structure with potentially heterogeneously-typed column<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Things that pandas can do:<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Easy handling of <strong>missing data<\/strong> (represented as NaN) in floating point as well as non-floating point data<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Size mutability: columns can be <strong>inserted and deleted<\/strong> from DataFrame and higher dimensional objects<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Automatic and explicit <strong>data alignment<\/strong>: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let <em>Series<\/em>, <em>DataFrame<\/em>, etc. automatically align the data for you in computations<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Powerful, flexible <strong>group by<\/strong> functionality to perform split apply combine operations on data sets, for both aggregating and transforming data<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Make it <strong>easy to convert<\/strong> ragged, differently-indexed data in other Python and NumPy data structures into DataFrame objects<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Intelligent label-based <strong>slicing<\/strong>, <strong>fancy indexing<\/strong>, and <strong>subsetting<\/strong> of large data sets<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Intuitive <strong>merging<\/strong> and <strong>joining<\/strong> data sets<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Flexible <strong>reshaping<\/strong> and pivoting of data sets<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Hierarchical<\/strong> labeling of axes<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Robust IO tools for loading data from <strong>flat files<\/strong> (CSV and delimited)<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Time series<\/strong>-specific functionality: date range generation and frequency conversion, moving window statistics, date shifting, and lagging.<\/li><\/ul>\n\n\n\n<p><strong><em>\u201c Pandas is built on top of NumPy and is intended to integrate well within a scientific computing environment with many other 3rd party libraries. \u201d<\/em><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to install Pandas ?<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Installing Pandas using Anaconda<\/strong><\/h3>\n\n\n\n<p>The easiest way to install pandas is to install it as part of the Anaconda distribution, a cross-platform distribution for data analysis and scientific computing. This is the recommended installation method for most users.<\/p>\n\n\n\n<p>To install this package with conda run the following code in your Jupyter Notebook:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>conda install -c anaconda pandas<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Installing Pandas using pip<\/strong><\/h3>\n\n\n\n<p>If you have <a href=\"https:\/\/www.h2kinfosys.com\/courses\/python-online-training\">Python <\/a>and pip already installed on a system, then the installation of Pandas is very easy.\u00a0<\/p>\n\n\n\n<p>Install it using this command:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>pip install pandas<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Pandas data frame representation<\/strong><\/h3>\n\n\n\n<p>This is how a pandas data frame looks:<\/p>\n\n\n\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/XpctC3pM23vE80sIGLyFgkEyBGl5y9CwYcWXd5ONcHzs6YeVgzLeog9uJfRZvENRn4sx5pFK8Bw9Xh_2ZS6_xVwyLSopax43bXXSzWv5p1-41dKuP45WKK2KE-eBlmzGCuUFdRUT9sNKWHEhZQ\" width=\"352\" height=\"257\" alt=\"\" title=\"\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How To Create a Pandas DataFrame ?<\/strong><\/h2>\n\n\n\n<p>A pandas DataFrame can be created using the following constructor&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>pd.DataFrame( data, index=\u2018rows\u2019, column=\u2018columns\u2019 )<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>A pandas DataFrame can&nbsp; also be created using various inputs like&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Lists<\/li><li>dict<\/li><li>Series<\/li><li>Numpy ndarrays<\/li><li>Another DataFrame<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Creating an Empty DataFrame<\/strong>.&nbsp;&nbsp;<\/h3>\n\n\n\n<p>A basic DataFrame, which can be created is an empty data frame. This is how you do it.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pandas as pd\ndf = pd.DataFrame()\ndf<\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Empty DataFrame<br>Columns: []<br>Index: []<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Create a DataFrame from Lists.<\/strong><\/h3>\n\n\n\n<p>The DataFrame can be created using a single list or a list of lists.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pandas as pd\ndata = [['Alex',10],['Bob',12],['Clarke',13]]\ndf = pd.DataFrame(data,columns=['Name','Age'])\nprint df<\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>&nbsp;Name&nbsp; &nbsp; &nbsp; Age<br>0 &nbsp; &nbsp; Alex&nbsp; &nbsp; &nbsp; 10&nbsp;<br>1 &nbsp; &nbsp; Bob &nbsp; &nbsp; &nbsp; 12&nbsp;<br>2 &nbsp; &nbsp; Clarke&nbsp; &nbsp; 13<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Create a DataFrame from Dict of ndarrays \/ Lists<\/strong><\/p>\n\n\n\n<p>All the ndarrays must be of the same length. If the index is passed, then the length of the index should equal the length of the arrays.<\/p>\n\n\n\n<p>If no index is passed, then by default, the index will be a range(n), where n is the array length.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pandas as pd\ndata = {'Name':['Tom', 'Jack', 'Steve', 'Ricky'],'Age':[28,34,29,42]}\ndf = pd.DataFrame(data, index=['rank1','rank2','rank3','rank4'])\nprint df\n<\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>&nbsp;&nbsp;&nbsp;Age&nbsp; &nbsp; Name<br>rank1&nbsp; &nbsp; 28&nbsp; &nbsp; &nbsp; Tom<br>rank2&nbsp; &nbsp; 34 &nbsp; &nbsp; Jack<br>rank3&nbsp; &nbsp; 29&nbsp; &nbsp; Steve<br>rank4&nbsp; &nbsp; 42&nbsp; &nbsp; Ricky<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Create a DataFrame from List of Dicts<\/strong><\/p>\n\n\n\n<p>A list of Dictionaries can be passed as input data to create a DataFrame. The dictionary keys are by default taken as column names.<\/p>\n\n\n\n<p>The following example shows how to create a DataFrame by passing a list of dictionaries.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pandas as pd\ndata = [{'a': 1, 'b': 2},{'a': 5, 'b': 10, 'c': 20}]\ndf = pd.DataFrame(data)\nprint df<\/pre>\n\n\n\n<p><strong>Output<\/strong> :<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>&nbsp;a&nbsp; &nbsp; b&nbsp; &nbsp; &nbsp; c<br>0 &nbsp; 1 &nbsp; 2 &nbsp; &nbsp; NaN<br>1 &nbsp; 5 &nbsp; 10 &nbsp; 20.0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Observe, NaN (Not a Number) is appended in missing areas.<\/p>\n\n\n\n<p><strong>How to select a specific column from the DataFrame<\/strong><\/p>\n\n\n\n<p>Consider the following DataFrame<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Age&nbsp; &nbsp; Name Sex<br>rank1&nbsp; &nbsp; 28&nbsp; &nbsp; &nbsp; Tom&nbsp; M&nbsp;<br>rank2&nbsp; &nbsp; 34 &nbsp; &nbsp; Jack&nbsp; M&nbsp;<br>rank3&nbsp; &nbsp; 29&nbsp; &nbsp; Steve&nbsp; M&nbsp;<br>rank4&nbsp; &nbsp; 42&nbsp; &nbsp; Ricky&nbsp; M<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Now we can access a specific column from the DataFrame by simply writing like this <code>df[\u2018Name\u2019]&nbsp;<\/code> And the resultant DataFrame is displayed<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Name&nbsp;<br>rank1&nbsp; &nbsp; Tom&nbsp;&nbsp;<br>rank2&nbsp; &nbsp; Jack&nbsp;<br>rank3&nbsp; &nbsp; Steve<br>rank4&nbsp; &nbsp; Ricky<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>How To Select an Index or Column From a Pandas DataFrame<\/strong><\/p>\n\n\n\n<p>In-order to select rows in a DataFrame we will use&nbsp; the following functions<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>iloc[]<\/li><li>loc[]<\/li><\/ul>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>one &nbsp; three&nbsp; two<br>a &nbsp; &nbsp; 1.0&nbsp; &nbsp; 10.0 &nbsp; 1&nbsp;<br>b &nbsp; &nbsp; 2.0&nbsp; &nbsp; 20.0 &nbsp; 2&nbsp;<br>c &nbsp; &nbsp; 3.0&nbsp; &nbsp; 30.0 &nbsp; 3&nbsp;<br>d &nbsp; &nbsp; NaN &nbsp; &nbsp; NaN &nbsp; 4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>.iloc[] function is used to get rows (or columns) at particular positions <strong>in the<\/strong> index<br><code>df.iloc[0:2]<\/code><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>one &nbsp; three&nbsp; two<br>a &nbsp; &nbsp; 1.0&nbsp; &nbsp; 10.0 &nbsp; 1&nbsp;<br>b &nbsp; &nbsp; 2.0&nbsp; &nbsp; 20.0 &nbsp; 2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>.loc[] function is used to get rows (or columns) with particular labels from the index<br><code>df.loc[\u2018a\u2019]<\/code><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>one &nbsp; &nbsp; &nbsp; 1.0<br>two &nbsp; &nbsp; &nbsp; 1.0<br>three&nbsp; &nbsp; 10.0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>How To Add an Index, Row or Column to a Pandas DataFrame<\/strong><\/p>\n\n\n\n<p>Now that you have learned how to select a value from a DataFrame, it\u2019s time to get to the real work and add an index, row, or column to it!<\/p>\n\n\n\n<p><strong>Add New Column to DataFrame<\/strong><\/p>\n\n\n\n<p>Consider a New Dataframe with Sales data from three different regions. We have data from the following region: West, North, and South.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Region &nbsp; Company &nbsp; Product &nbsp; &nbsp; Month&nbsp; &nbsp; &nbsp; Sale<br>0 &nbsp; West &nbsp; &nbsp; Costco&nbsp; &nbsp; Dinner_set&nbsp; September&nbsp; 2500<br>1 &nbsp; North&nbsp; &nbsp; Walmart &nbsp; Grocery &nbsp; &nbsp; July &nbsp; &nbsp; &nbsp; 3096<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Pandas allow you to add a new column Purchase\u2019s to this DataFrame<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>purchase = [3000, 4000]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>df.assign(Purchase=purchase)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>And this is the resultant DataFrame<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Region&nbsp; Company&nbsp; Product&nbsp; &nbsp; Month &nbsp; &nbsp; Sale Purchase<br>0 West&nbsp; &nbsp; Costco &nbsp; Dinner_set September 2500 3000&nbsp;&nbsp;&nbsp;&nbsp;<br>1 North &nbsp; Walmart&nbsp; Grocery&nbsp; &nbsp; July&nbsp; &nbsp; &nbsp; 3096 4000<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Add New Row to DataFrame<\/strong><\/p>\n\n\n\n<p>This is a data dictionary with the values of one Region &#8211; East that we want to enter in the above dataframe. The data is basically a list with Dictionary having columns as key and their corresponding values.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">df=[{\u2018Region\u2019:\u2019South\u2019,\u2019Company':'D_Mart','Product':&nbsp;&nbsp;&nbsp;\n'Tables','Month':'December','Sales': 1500,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Purchase':3500}]<\/pre>\n\n\n\n<p>And this is the resultant DataFrame<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Region&nbsp; Company&nbsp; Product&nbsp; &nbsp; Month &nbsp; &nbsp; Sale Purchase<br>0 West&nbsp; &nbsp; Costco &nbsp; Dinner_set September 2500 3000&nbsp;&nbsp;&nbsp;&nbsp;<br>1 North &nbsp; Walmart&nbsp; Grocery&nbsp; &nbsp; July&nbsp; &nbsp; &nbsp; 3096 4000&nbsp;&nbsp;&nbsp;&nbsp;<br>2 South &nbsp; D-mart &nbsp; Tables &nbsp; &nbsp; December&nbsp; 1500 3500<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Add New Index to DataFrame<\/strong><\/p>\n\n\n\n<p>The index of a DataFrame is a set that consists of a label for each row<\/p>\n\n\n\n<p>Now we will consider this DataFrame, and try to set a column as an index.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Region&nbsp; Company&nbsp; Product&nbsp; &nbsp; Month &nbsp; &nbsp; Sale Purchase<br>0 West&nbsp; &nbsp; Costco &nbsp; Dinner_set September 2500 3000&nbsp;&nbsp;&nbsp;&nbsp;<br>1 North &nbsp; Walmart&nbsp; Grocery&nbsp; &nbsp; July&nbsp; &nbsp; &nbsp; 3096 4000&nbsp;&nbsp;&nbsp;&nbsp;<br>2 South &nbsp; D-mart &nbsp; Tables &nbsp; &nbsp; December&nbsp; 1500 3500<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This is how we do it<br><code>df = df.set_index(\u2018Region\u2019)<\/code><\/p>\n\n\n\n<p>This is how the DataFrame looks after setting \u201cRegion\u201d as an index<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Region Company&nbsp; Product&nbsp; &nbsp; Month &nbsp; &nbsp; Sale Purchase&nbsp;<br>West&nbsp; &nbsp; &nbsp; Costco &nbsp; Dinner_set September 2500 3000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>North &nbsp; &nbsp; Walmart&nbsp; Grocery&nbsp; &nbsp; July&nbsp; &nbsp; &nbsp; 3096 4000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>South &nbsp; &nbsp; D-mart &nbsp; Tables &nbsp; &nbsp; December&nbsp; 1500 3500<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The column \u2019Region\u2019 is now the index of the DataFrame.<\/p>\n\n\n\n<p><strong>Resetting the Index of Your DataFrame<\/strong><\/p>\n\n\n\n<p>When your index doesn\u2019t look entirely the way you want it to, you can opt to reset it. You can easily do this with <code>reset_index()<\/code><\/p>\n\n\n\n<p><strong>How to Delete Rows or Columns From a Pandas Data Frame<\/strong><\/p>\n\n\n\n<p>Now that you have seen how to select and add indices, rows, and columns to your DataFrame<\/p>\n\n\n\n<p>Consider a DataFrame<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-subtle-pale-blue-background-color has-background\"><tbody><tr><td>Region&nbsp; Company&nbsp; Product&nbsp; &nbsp; Month &nbsp; &nbsp; Sale Purchase<br>0 West&nbsp; &nbsp; Costco &nbsp; Dinner_set September 2500 3000&nbsp;&nbsp;&nbsp;&nbsp;<br>1 North &nbsp; Walmart&nbsp; Grocery&nbsp; &nbsp; July&nbsp; &nbsp; &nbsp; 3096 4000&nbsp;&nbsp;&nbsp;&nbsp;<br>2 South &nbsp; D-mart &nbsp; Tables &nbsp; &nbsp; December&nbsp; 1500 3500<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Dropping columns with the column name<\/strong><\/p>\n\n\n\n<p>To get rid of columns from your DataFrame, you can use the drop() method:<br><code>df=df.drop(\u2018Purchase\u2019)&nbsp;<\/code><\/p>\n\n\n\n<p><strong>Dropping Rows by index label<\/strong><\/p>\n\n\n\n<p>To get rid of row from your DataFrame, you can use the drop() method:<br><code>df=df.drop(\u20180\u2019,inplace = True)<\/code><\/p>\n\n\n\n<p>We use &#8216;<strong>inplace<\/strong>=<strong>True<\/strong>&#8216; if we want to commit the changes to the dataframe<\/p>\n\n\n\n<p>We will discuss the rest of the Pandas functions and other features in the next article.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pandas is a popular Python package for data science, and with good reason, it offers powerful, expressive, and flexible data structures that make data manipulation and analysis easy, among many other things. The DataFrame is one of these structures. What is Pandas ? Pandas is a Python package providing fast, flexible, and expressive data structures [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4783,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[500],"tags":[1337,1336],"class_list":["post-4757","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science-using-python-tutorials","tag-pandas","tag-pandas-data-structures"],"_links":{"self":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/4757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/comments?post=4757"}],"version-history":[{"count":0,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/4757\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media\/4783"}],"wp:attachment":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media?parent=4757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/categories?post=4757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/tags?post=4757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}