<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MdMusfikurRahmanSifar</title>
    <description>The latest articles on DEV Community by MdMusfikurRahmanSifar (@mdmusfikurrahmansifar).</description>
    <link>https://dev.to/mdmusfikurrahmansifar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F994214%2Feb57634a-9527-4dd4-826f-d2130b7ac6f4.jpg</url>
      <title>DEV Community: MdMusfikurRahmanSifar</title>
      <link>https://dev.to/mdmusfikurrahmansifar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mdmusfikurrahmansifar"/>
    <language>en</language>
    <item>
      <title>Predictive Models</title>
      <dc:creator>MdMusfikurRahmanSifar</dc:creator>
      <pubDate>Fri, 21 Jul 2023 16:38:24 +0000</pubDate>
      <link>https://dev.to/mdmusfikurrahmansifar/predictive-models-58eg</link>
      <guid>https://dev.to/mdmusfikurrahmansifar/predictive-models-58eg</guid>
      <description>&lt;p&gt;Predictive models are like tools or functions. &lt;/p&gt;

&lt;p&gt;You give inputs and it gives outputs. But the outputs are based on that function, that is the model. The way you build your function, its going to give outputs accordingly. And to build that function you need to make relation between your parameters. This depends on the datas that has been inputted previously, that is the historical data.&lt;br&gt;
Let's understand this through example.&lt;/p&gt;

&lt;p&gt;1️⃣ Suppose you inputted the total class attended of 100 &lt;br&gt;
   students and the their results of final exam in a software.&lt;/p&gt;

&lt;p&gt;2️⃣ Then the software found that the relation between the class &lt;br&gt;
   attended and the final score is, &lt;strong&gt;final score = 0.25*class &lt;br&gt;
   attended + 5.[y=0.25*x+5]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;3️⃣ Now, if you ask the software randomly, if a student attended &lt;br&gt;
   25 classes than what would be his probable final test score?&lt;/p&gt;

&lt;p&gt;4️⃣ The software would give the answer following the model that &lt;br&gt;
    is the formula which is the relation between the parameters, &lt;br&gt;
    final score and class attended. Just put the value of x.&lt;/p&gt;

&lt;p&gt;The first point describes the first thing to create a model that is inputting the &lt;strong&gt;Historical data&lt;/strong&gt;. &lt;br&gt;
Then considering necessary features  that is &lt;strong&gt;Feature Selection&lt;/strong&gt;(here are only two features, class attended and exam score. You might need to consider multiple features or select the relevant features out of many according to the context).&lt;br&gt;
After that, finding the relation between the features through the most suitable approach that is &lt;strong&gt;Model Selection&lt;/strong&gt;(our model y=0.25*x+5 is a straight line, but to get that we need a certain approach or algorithm which depends on the given and expected data).&lt;br&gt;
Then comes &lt;strong&gt;Model Training&lt;/strong&gt;.&lt;br&gt;
After training the model with the historical data regarding the features we find our predictive model.( Here it is the straight line formula)&lt;br&gt;
But we need to check how accurate the model is with the prediction.(We found the model but we need to check that if that actually is a good one. Because straight line have slopes and constant which is the m and c in the formula y=mx+c, we need to find the best suitable m and c for our data) So we run accuracy test that is &lt;strong&gt;Model Evaluation&lt;/strong&gt;.&lt;br&gt;
Checking to find the best model.(Finding the right m and c for the formula. Here the best model we found is y=0.25*x+5)&lt;br&gt;
When we are satisfied with the accuracy of our model, we &lt;strong&gt;Predict&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BQoYh4g2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5neq2tqlx2522ifxt9pb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BQoYh4g2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5neq2tqlx2522ifxt9pb.png" alt="Predictive Model Mindmap" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are the main steps for creating a predictive model. But there  are many sub points and lots of forms or options in each step. The choices depend on the nature of the data, the problem being addressed, and the desired accuracy and interpretability of the predictions. For example, the numerical data and the categorical data have different approaches in creating model and predicting. The depth is unceasing...the more you gain knowledge the better you get in dealing with wide range of datas..&lt;/p&gt;

&lt;p&gt;The goal of a predictive model is-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;to analyze patterns, relationships, and trends in the available data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;to make predictions about future events or outcomes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To sum up, Predictive models learn from historical data by identifying relevant features and building a mathematical framework or algorithm that captures the underlying patterns and relationships in the data. Once trained, the model can then be used to make predictions on new, unseen data. Predictive models are widely used in various applications, such as weather forecasting, stock market prediction, customer churn prediction, fraud detection, healthcare diagnostics, and many others.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Choropleth Map using Plotly: Geographical Visualization</title>
      <dc:creator>MdMusfikurRahmanSifar</dc:creator>
      <pubDate>Tue, 31 Jan 2023 11:33:32 +0000</pubDate>
      <link>https://dev.to/mdmusfikurrahmansifar/choropleth-map-using-plotly-geographical-visualization-21bn</link>
      <guid>https://dev.to/mdmusfikurrahmansifar/choropleth-map-using-plotly-geographical-visualization-21bn</guid>
      <description>&lt;p&gt;We will discuss the followings-&lt;br&gt;
&lt;strong&gt;1. Structure&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2. Nationwise example&lt;br&gt;
-Without chart&lt;br&gt;
-With chart&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;3. Global example&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;u&gt;Stucture:&lt;/u&gt;
&lt;/h1&gt;

&lt;p&gt;First we need to-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd
import chart_studio.plotly as py
import plotly.graph_objs as go
from plotly import __version__
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It might seem really complex...so let's break it down into steps-&lt;/p&gt;

&lt;h3&gt;
  
  
  Step-1:
&lt;/h3&gt;

&lt;p&gt;We need to begin to build our data dictionary. Easiest way to do this is to use the &lt;code&gt;dict()&lt;/code&gt; function of the general form:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YwD-TQ2l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9dff8t4mecbjk4uohfh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YwD-TQ2l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9dff8t4mecbjk4uohfh.png" alt="02" width="800" height="329"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://plotly.com/python/colorscales/"&gt;Custom colorscale&lt;/a&gt;&lt;br&gt;
locationmode can be: USA|ISO-3|country names&lt;br&gt;
location and locationmode are connected&lt;br&gt;
For details &lt;a href="https://plotly.com/python-api-reference/generated/plotly.express.choropleth.html"&gt;check this&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Step-2:
&lt;/h3&gt;

&lt;p&gt;Then we create the layout nested dictionary:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ij_b-9Hj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oaoa27mso905hp2r36bb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ij_b-9Hj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oaoa27mso905hp2r36bb.png" alt="03" width="800" height="27"&gt;&lt;/a&gt;&lt;br&gt;
The 'scope' property is an enumeration that may be specified as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One of the following enumeration value:['africa', 'asia', 'europe', 'north america', 'south america', 'usa', 'world']&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step-3:
&lt;/h3&gt;

&lt;p&gt;Then we use:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZQjDxKjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5h3tv2vsdxtgqfpo4n6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZQjDxKjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5h3tv2vsdxtgqfpo4n6.png" alt="04" width="800" height="29"&gt;&lt;/a&gt;&lt;br&gt;
to set up the object that finally gets passed into iplot()&lt;/p&gt;

&lt;h3&gt;
  
  
  Step-4:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K9EDTpoE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0gzx1vs001mj727a9rqm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K9EDTpoE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0gzx1vs001mj727a9rqm.png" alt="05" width="800" height="25"&gt;&lt;/a&gt;&lt;br&gt;
To know all the dimensions, arguments1 and editing options &lt;a href="https://plotly.com/python-api-reference/generated/plotly.express.choropleth.html"&gt;check this&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;u&gt;Nationwise example:&lt;/u&gt;
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Without chart:
&lt;/h2&gt;

&lt;p&gt;Let's plot USA states-&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kyCzJeL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xbs8b9xgfjbyjewbdzl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kyCzJeL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xbs8b9xgfjbyjewbdzl.png" alt="06" width="800" height="203"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cm_vlAfS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6kqzwuj2ib9eadz3enl4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cm_vlAfS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6kqzwuj2ib9eadz3enl4.png" alt="07" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  With chart:
&lt;/h2&gt;

&lt;p&gt;For this a statistical chart of nationwise states has to be present in your repository.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hm8kMP9d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzr08pjvr7lldbas2wg9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hm8kMP9d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzr08pjvr7lldbas2wg9.png" alt="08" width="800" height="328"&gt;&lt;/a&gt;&lt;br&gt;
We will use the columns for 'location', 'text', 'z' etc.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WlsXuznR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fksn7mjkbfqjq2m1g2i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WlsXuznR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fksn7mjkbfqjq2m1g2i.png" alt="09" width="800" height="227"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eJ3s3MwY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tbajvkoz1zjk89ih10z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eJ3s3MwY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tbajvkoz1zjk89ih10z.png" alt="10" width="800" height="348"&gt;&lt;/a&gt;&lt;br&gt;
Here we used some customization.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;u&gt;Global Example:&lt;/u&gt;
&lt;/h1&gt;

&lt;p&gt;Here we will have to include a statistical chart that includes all the countries in the world&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9pi-oVjt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndivma3uqwim7gz8l33j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9pi-oVjt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndivma3uqwim7gz8l33j.png" alt="13" width="800" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QPYtYhxK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1d3oad7ox21itk470h1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QPYtYhxK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1d3oad7ox21itk470h1l.png" alt="11" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Il7YK_Z1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1abzpyqto6w0af86oj02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Il7YK_Z1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1abzpyqto6w0af86oj02.png" alt="12" width="800" height="391"&gt;&lt;/a&gt;&lt;br&gt;
We can plot different types of maps by changing the projection&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oPg0XgLZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zu62o4aqn9m28iawif5h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oPg0XgLZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zu62o4aqn9m28iawif5h.png" alt="14" width="784" height="494"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1mLqpCJ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vbh136li34igz0crrsom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1mLqpCJ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vbh136li34igz0crrsom.png" alt="15" width="737" height="443"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BdJspNBI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pb1hfrjxhb0zkh8h7qo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BdJspNBI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pb1hfrjxhb0zkh8h7qo.png" alt="16" width="738" height="448"&gt;&lt;/a&gt;&lt;br&gt;
So we have lots of customization option...Don't forget to reference the documentation....&lt;br&gt;
&lt;strong&gt;(!)&lt;/strong&gt;Wanna see the choropleth map of Bangladesh...see you soon...let's dive😉&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Important Links:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://plotly.com/python-api-reference/generated/plotly.graph_objects.Choropleth.html#plotly.graph_objects.Choropleth"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://plotly.com/python/colorscales/"&gt;Colorscale&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Seaborn: Python Visualization</title>
      <dc:creator>MdMusfikurRahmanSifar</dc:creator>
      <pubDate>Thu, 26 Jan 2023 18:37:14 +0000</pubDate>
      <link>https://dev.to/mdmusfikurrahmansifar/seaborn-python-visualization-465e</link>
      <guid>https://dev.to/mdmusfikurrahmansifar/seaborn-python-visualization-465e</guid>
      <description>&lt;p&gt;Seaborn is a python visualization library built on matplotlib. Its a great tool for statistical visualization. Let's dive....&lt;/p&gt;

&lt;p&gt;First we need to &lt;code&gt;pip install seaborn&lt;/code&gt; then-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For visualization we need data. Here we can use any stock data, csv file etc. Even input manually. More data is better for understanding the plots. Here we can use already made dataset saved in seaborn. Run &lt;code&gt;sns.get_dataset_names()&lt;/code&gt; to get all the saved dataset names.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Few33ofe9iu22h3rds0j9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Few33ofe9iu22h3rds0j9.png" alt="01" width="667" height="459"&gt;&lt;/a&gt;&lt;br&gt;
To get the table we gonna use &lt;code&gt;.load_dataset()&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjve5hr01m6svh38ueel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjve5hr01m6svh38ueel.png" alt="02" width="800" height="126"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstnynamibu1t1yepqaff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstnynamibu1t1yepqaff.png" alt="03" width="696" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now in seaborn there are mainly three types of plots-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Distribution Plots&lt;/li&gt;
&lt;li&gt;Categorical Plots&lt;/li&gt;
&lt;li&gt;Matrix Plots&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To be really informal-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;u&gt;Distribution plot:&lt;/u&gt; There's a data against a parameter.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Categorical plot:&lt;/u&gt; There's multiple sub-parameter or categories for a parameter and there's data for each one.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Matrix plot:&lt;/u&gt; There's a data against two parameter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example-&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xttfd21787hoov0wyn3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xttfd21787hoov0wyn3.png" alt="04" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7nmbpc4d3g5h9jlt42x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7nmbpc4d3g5h9jlt42x.png" alt="05" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;We need to keep this idea in mind while choosing our plot according to the data.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Secondly, we should use &lt;code&gt;shift+tab&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
Now let's start-&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;u&gt;Distribution Plot:&lt;/u&gt;
&lt;/h1&gt;

&lt;p&gt;Let's discuss some plots that allow us to visualize the distribution of a data set. These plots are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;distplot&lt;/li&gt;
&lt;li&gt;jointplot&lt;/li&gt;
&lt;li&gt;pairplot&lt;/li&gt;
&lt;li&gt;rugplot&lt;/li&gt;
&lt;li&gt;kdeplot&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Distplot:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmjq17tnmzmtfipsog01y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmjq17tnmzmtfipsog01y.png" alt="06" width="800" height="338"&gt;&lt;/a&gt;&lt;br&gt;
Again there's lots of option to customize. Just see the docstrings with &lt;code&gt;shift+tab&lt;/code&gt; and play with it.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfkvebpt8yl2dvcu9wdc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfkvebpt8yl2dvcu9wdc.png" alt="08" width="759" height="336"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F74wxasr588cqi0xg39qs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F74wxasr588cqi0xg39qs.png" alt="07" width="763" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Jointplot:
&lt;/h2&gt;

&lt;p&gt;Here we join two different distribution plot so we need to define x and y axis. Also we can select the plot kind.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99qdecroc7ka3lhmyi4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99qdecroc7ka3lhmyi4z.png" alt="09" width="627" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's some kind options-scatter,reg,resid,kde,hex&lt;/p&gt;

&lt;h2&gt;
  
  
  Pairplot:
&lt;/h2&gt;

&lt;p&gt;Pairplot will plot pairwise relationships across an entire dataframe (for the numerical columns) and supports a color hue argument (for categorical columns).&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fog718mnhydlu54rfb7nj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fog718mnhydlu54rfb7nj.png" alt="10" width="536" height="488"&gt;&lt;/a&gt;&lt;br&gt;
Again docstring...add hue(color separation according to the categorical column) and palette(a color combo)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkl4jslq21usadqebm0iu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkl4jslq21usadqebm0iu.png" alt="11" width="627" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rugplot:
&lt;/h2&gt;

&lt;p&gt;Rugplots are actually a very simple concept, they just draw a dash mark for every point on a univariate distribution. They are the building block of a KDE plot.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpze0fm1tunt9vacg5b63.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpze0fm1tunt9vacg5b63.png" alt="12" width="586" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Kdeplot:
&lt;/h2&gt;

&lt;p&gt;kdeplots are Kernel Density Estimation plots. These KDE plots replace every single observation with a Gaussian (Normal) distribution centered around that value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefxkw0pk8ha8tdns3v42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefxkw0pk8ha8tdns3v42.png" alt="13" width="793" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;u&gt;Categorical Plots:&lt;/u&gt;
&lt;/h1&gt;

&lt;p&gt;Now let's discuss using seaborn to plot categorical data! There are a few main plot types for this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;factorplot&lt;/li&gt;
&lt;li&gt;boxplot&lt;/li&gt;
&lt;li&gt;barplot&lt;/li&gt;
&lt;li&gt;countplot&lt;/li&gt;
&lt;li&gt;violinplot&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Factorplot:
&lt;/h2&gt;

&lt;p&gt;Factorplot is the most general form of a categorical plot. It can take in a kind parameter to adjust the plot type:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fogq6ornppsay8x4fxy83.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fogq6ornppsay8x4fxy83.png" alt="14" width="720" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Barplot and Countplot:
&lt;/h2&gt;

&lt;p&gt;These very similar plots allow you to get aggregate data off a categorical feature in your data. barplot is a general plot that allows you to aggregate the categorical data based off some function, by default the mean:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5c6ird00s6dvydbyirm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5c6ird00s6dvydbyirm.png" alt="15" width="766" height="378"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6vpsmp57lm9imssudbv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6vpsmp57lm9imssudbv.png" alt="16" width="689" height="418"&gt;&lt;/a&gt;&lt;br&gt;
Countplot is essentially the same as barplot except the estimator is explicitly counting the number of occurrences. Which is why we only pass the x value:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvl0o77zs27qhlfo3v5l0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvl0o77zs27qhlfo3v5l0.png" alt="17" width="749" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Boxplot and violinplot:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Boxplot:
&lt;/h3&gt;

&lt;p&gt;Boxplots and violinplots are used to shown the distribution of categorical data. A box plot (or box-and-whisker plot) shows the distribution of quantitative data in a way that facilitates comparisons between variables or across levels of a categorical variable. The box shows the quartiles of the dataset while the whiskers extend to show the rest of the distribution, except for points that are determined to be “outliers” using a method that is a function of the inter-quartile range.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd67h2ll62f7ygss77wr7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd67h2ll62f7ygss77wr7.png" alt="18" width="793" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Violin plot:
&lt;/h3&gt;

&lt;p&gt;A violin plot plays a similar role as a box and whisker plot. It shows the distribution of quantitative data across several levels of one (or more) categorical variables such that those distributions can be compared. Unlike a box plot, in which all of the plot components correspond to actual datapoints, the violin plot features a kernel density estimation of the underlying distribution.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzuu1frm3vtql2mhl6k17.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzuu1frm3vtql2mhl6k17.png" alt="19" width="777" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;Matrix Plot:&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;Matrix plots allow you to plot data as color-encoded matrices.&lt;br&gt;
Let's begin by exploring seaborn's heatmap-&lt;br&gt;
In order for a heatmap to work properly, your data should already be in a matrix form, the sns.heatmap function basically just colors it in for you. Now for getting a matrix presentation we can use &lt;code&gt;.pivot_table()&lt;/code&gt;.To get a good plot let's input 'flights' dataset.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsa5lxwcrsymgbhidb1gy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsa5lxwcrsymgbhidb1gy.png" alt="20" width="711" height="349"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Favwmeuckqv0d4c7uy816.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Favwmeuckqv0d4c7uy816.png" alt="21" width="792" height="414"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1n1k6dqjbm21r3vu2w1h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1n1k6dqjbm21r3vu2w1h.png" alt="22" width="743" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are more customizing options and plotting dimensions. But this was the basic idea. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;Notes:&lt;/u&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Know what data goes with your plot and select those datas for the desired plot&lt;/li&gt;
&lt;li&gt; Know the types of the plots&lt;/li&gt;
&lt;li&gt;Syntax is the main thing &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shift+tab&lt;/code&gt; is your best friend....get to know him and play with him.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>coding</category>
    </item>
    <item>
      <title>Plotly and Cufflinks</title>
      <dc:creator>MdMusfikurRahmanSifar</dc:creator>
      <pubDate>Mon, 16 Jan 2023 06:53:36 +0000</pubDate>
      <link>https://dev.to/mdmusfikurrahmansifar/plotly-and-cufflinks-4749</link>
      <guid>https://dev.to/mdmusfikurrahmansifar/plotly-and-cufflinks-4749</guid>
      <description>&lt;p&gt;Plotly is a interactive python library and cufflinks connects plotly with pandas. &lt;/p&gt;

&lt;p&gt;First we need to-&lt;br&gt;
&lt;code&gt;pip install plotly&lt;/code&gt;&lt;br&gt;
&lt;code&gt;pip install cufflinks&lt;/code&gt;&lt;br&gt;
&lt;code&gt;pip install chart_studio&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then we need to do these-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import chart_studio.plotly as py
import cufflinks as cf
%matplotlib inline
from plotly import __version__
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
cf.go_offline()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ahh...now if you don't want to know what are they for just go forward or-&lt;br&gt;
&lt;strong&gt;Explanation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We will require plotly version greater than 1.9.0, if you don't have it update plotly&lt;/li&gt;
&lt;li&gt;We need to give comman to use open source library of plotly.
&lt;code&gt;from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot&lt;/code&gt; 
&lt;u&gt;N.B.&lt;/u&gt; Plotly is a company that offers online and offline facilities. Some are paid. For our usage we are going to use the offline free services.
-&lt;code&gt;init_notebook_mode(connected=True)&lt;/code&gt; connects javascript with notebook. Plotly is gonna basically use pandas and python to javascript library&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cf.go_offline()&lt;/code&gt; will allow cufflink use offline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Matplotlib we use &lt;code&gt;.plot()&lt;/code&gt;, in plotly we use &lt;code&gt;iplotly()&lt;/code&gt;&lt;br&gt;
So, it is &lt;strong&gt;i&lt;/strong&gt; that is the difference in a sense.&lt;br&gt;
Obviously the arguments are not same.&lt;/p&gt;

&lt;p&gt;Basically plotly and cufflinks makes different kinds of plots based on data like matplotly but plotly is interactive and has more dimensions to it. Let's see-&lt;/p&gt;

&lt;p&gt;But first let's see  for the basics which plots we are gonna discuss-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;scatter&lt;/li&gt;
&lt;li&gt;bar&lt;/li&gt;
&lt;li&gt;box&lt;/li&gt;
&lt;li&gt;spread&lt;/li&gt;
&lt;li&gt;ratio&lt;/li&gt;
&lt;li&gt;heatmap&lt;/li&gt;
&lt;li&gt;surface&lt;/li&gt;
&lt;li&gt;histogram&lt;/li&gt;
&lt;li&gt;bubble&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now-&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QGqzq7DO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zse8liaowtx37xon3huh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QGqzq7DO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zse8liaowtx37xon3huh.png" alt="01" width="800" height="338"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9IohYMAw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/62y6rixq3apevmkz0y5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9IohYMAw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/62y6rixq3apevmkz0y5w.png" alt="05" width="576" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Scatter:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LqIUPw5X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xpiomtbz91cc81t0q78y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LqIUPw5X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xpiomtbz91cc81t0q78y.png" alt="02" width="800" height="453"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;We have some tools in the right top corner of the plot when we hover the mouse on it. The legends are also interactive.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fmx5KO8r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ja85z9fd483ra3us90b9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fmx5KO8r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ja85z9fd483ra3us90b9.png" alt="03" width="800" height="406"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;That's one of the advantages we get. Plus the interactive part-&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5v9La094--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcriyxbxai197ki7wd46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5v9La094--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcriyxbxai197ki7wd46.png" alt="04" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bar:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--luuO0qPf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u36kdzhd3fmx9ya1bfsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--luuO0qPf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u36kdzhd3fmx9ya1bfsn.png" alt="06" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Box:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--weQRSyQl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3p43e40tid4zljex2no4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--weQRSyQl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3p43e40tid4zljex2no4.png" alt="07" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Spread:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w42ulSh1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6oj4ifxj6ixbt7guu0bt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w42ulSh1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6oj4ifxj6ixbt7guu0bt.png" alt="08" width="800" height="142"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k5V66CSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bc7m07bsatfo68ynfg3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k5V66CSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bc7m07bsatfo68ynfg3.png" alt="09" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Ratio:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4aEL2By6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6k9uq8xmb6bbokts75qk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4aEL2By6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6k9uq8xmb6bbokts75qk.png" alt="10" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Heatmap:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m92IEeMA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdlqizngjlgppjzxxtsr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m92IEeMA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdlqizngjlgppjzxxtsr.png" alt="11" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Surface:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uVtnZvpx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cx7ri94t7p0xrh64jgam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uVtnZvpx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cx7ri94t7p0xrh64jgam.png" alt="12" width="800" height="409"&gt;&lt;/a&gt;&lt;br&gt;
We can rotate the plot&lt;/p&gt;

&lt;h2&gt;
  
  
  Histogram:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d02o06nk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2086j8ydabve3kt965ds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d02o06nk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2086j8ydabve3kt965ds.png" alt="13" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bubble:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--taffCI9V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iom4sqdf2petff99k5uz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--taffCI9V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iom4sqdf2petff99k5uz.png" alt="14" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in &lt;code&gt;.iplot()&lt;/code&gt; there's tons of arguments use &lt;code&gt;shift+tab&lt;/code&gt; to see them. Now play with the interactive powers. Play with it to know it....&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Matplotlib: Plotting in Matplotlib</title>
      <dc:creator>MdMusfikurRahmanSifar</dc:creator>
      <pubDate>Fri, 13 Jan 2023 05:04:14 +0000</pubDate>
      <link>https://dev.to/mdmusfikurrahmansifar/matplotlib-plotting-in-matplotlib-he1</link>
      <guid>https://dev.to/mdmusfikurrahmansifar/matplotlib-plotting-in-matplotlib-he1</guid>
      <description>&lt;p&gt;Matplotlib is the "grandfather" library of data visualization with Python. It is an excellent 2D and 3D graphics library for generating scientific figures.&lt;/p&gt;

&lt;p&gt;Basics of matplotlib basically means-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to plot&lt;/li&gt;
&lt;li&gt;How to edit the plot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our main focus in this will be the plotting part. Some editing will be along the way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We will discuss-&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Plotting in two ways&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Subplot in two ways&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First we need to-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import matplotlib.pyplot as plt
%matplotlib inline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;%matplotlib inline&lt;/code&gt; is used in jupyter. It allows us to plot the graph without extra command. Otherwise on other editors to see the plot we will need to use plt.show()&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;u&gt;Plotting in two ways&lt;/u&gt;:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Functional method:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcefr0762b09i27giw5fc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcefr0762b09i27giw5fc.png" alt="01" width="800" height="254"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F116mskbp5s8t66j21u5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F116mskbp5s8t66j21u5n.png" alt="02" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Object Oriented Method:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngljp25guktjexa087d3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngljp25guktjexa087d3.png" alt="03" width="800" height="375"&gt;&lt;/a&gt;&lt;br&gt;
This method actually gives us control over the figure's axes...It is really helpful. Play with it to know it!&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;u&gt;Subplots in two ways&lt;/u&gt;:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Functional method:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nunukmito8hh7jm43od.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nunukmito8hh7jm43od.png" alt="04" width="800" height="142"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftjfzbbck1rlq8fr103o9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftjfzbbck1rlq8fr103o9.png" alt="05" width="640" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  OO method:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frw3m3kruvk23swxqbp1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frw3m3kruvk23swxqbp1w.png" alt="06" width="497" height="177"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojcqbq0uys9mc0s5ev82.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojcqbq0uys9mc0s5ev82.png" alt="07" width="727" height="521"&gt;&lt;/a&gt;&lt;br&gt;
We can actually see the power of this method in this example.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhmi1c1u4kbbb60dobbq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhmi1c1u4kbbb60dobbq.png" alt="08" width="623" height="526"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozf2in57ffotpie860u7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozf2in57ffotpie860u7.png" alt="09" width="762" height="291"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wjkwwwtr7msau2mxbac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wjkwwwtr7msau2mxbac.png" alt="10" width="660" height="461"&gt;&lt;/a&gt;&lt;br&gt;
Here &lt;code&gt;.set_xlabel()&lt;/code&gt; &lt;code&gt;.set_ylabel()&lt;/code&gt; &lt;code&gt;.set_title()&lt;/code&gt; are used for editing. There's a lot that we can edit in matplotlib....go ahead and find out them. I am mentioning some-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You can use the label="label text" keyword argument when plots or other objects are added to the figure, and then using the legend method without arguments to add the legend to the figure:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F768zhkfod16omy901z5u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F768zhkfod16omy901z5u.png" alt="11" width="511" height="488"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To change the line width, we can use the linewidth or lw keyword argument. The line style can be selected using the linestyle or ls keyword arguments:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9ym0dewc9td1slsqbq9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9ym0dewc9td1slsqbq9.png" alt="12" width="667" height="439"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxvhuavysxzofimg1w1m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxvhuavysxzofimg1w1m.png" alt="13" width="643" height="331"&gt;&lt;/a&gt;&lt;br&gt;
There is more to matplotlib. Let's keep exploring....&lt;/p&gt;

</description>
      <category>linux</category>
      <category>pcgaming</category>
    </item>
    <item>
      <title>Pandas-Basics In Short</title>
      <dc:creator>MdMusfikurRahmanSifar</dc:creator>
      <pubDate>Mon, 09 Jan 2023 13:03:53 +0000</pubDate>
      <link>https://dev.to/mdmusfikurrahmansifar/pandas-basics-in-short-1196</link>
      <guid>https://dev.to/mdmusfikurrahmansifar/pandas-basics-in-short-1196</guid>
      <description>&lt;p&gt;Pandas is a python library that is used to analyse data. It is a table themed library like spreadsheet in excel unlike numpy which had a matrixlike theme. It allows us to analyse, manipulate and explore huge amount of data.&lt;/p&gt;

&lt;p&gt;For the basics, we will discuss a few topics-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Series&lt;/li&gt;
&lt;li&gt;DataFrame&lt;/li&gt;
&lt;li&gt;Missing data&lt;/li&gt;
&lt;li&gt;Groupby&lt;/li&gt;
&lt;li&gt;Merging,joining &amp;amp; concatinating&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To start we need to-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import numpy as np
import pandas as pd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Series:
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;syn=pd.Series(data,index)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3sa960k9sk4q0iqzr3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3sa960k9sk4q0iqzr3z.png" alt="series ex" width="662" height="334"&gt;&lt;/a&gt;&lt;br&gt;
Here data and index can be edited and fixed according to our need. It can be &lt;strong&gt;list, numpy array or even dictionary.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u2awnnviunb3hask68p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u2awnnviunb3hask68p.png" alt="series datatype" width="462" height="139"&gt;&lt;/a&gt;&lt;br&gt;
Here's some examples-(look up the variations)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvf2m7qkuc9lwmbhsnmj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvf2m7qkuc9lwmbhsnmj.png" alt="pd-03" width="527" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foo44sl7824gc2e1t1sih.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foo44sl7824gc2e1t1sih.png" alt="pd-04" width="616" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipjzm945xts8mezfcjey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipjzm945xts8mezfcjey.png" alt="pd-05" width="552" height="201"&gt;&lt;/a&gt;&lt;br&gt;
If index not mentioned then by default it is added from 0&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekghjc3026g64h52gmhx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekghjc3026g64h52gmhx.png" alt="pd-06" width="455" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3u9jiiebsvqlphxxlplf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3u9jiiebsvqlphxxlplf.png" alt="pd-07" width="525" height="213"&gt;&lt;/a&gt;&lt;br&gt;
In dictionary the keys are the index and values are data&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqv8zyzkzn010mwjapp14.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqv8zyzkzn010mwjapp14.png" alt="pd-08" width="536" height="200"&gt;&lt;/a&gt;&lt;br&gt;
Series is just an idea but we won't see it most often. Its like a string in a list. It won't show a table rather a tablelike presentation. Now what we will use is dataframe which gives us our expected output.&lt;/p&gt;

&lt;h1&gt;
  
  
  DataFrame:
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;syn=pd.DataFrame(data,index,columns)&lt;/strong&gt;&lt;br&gt;
It is the fundamental topic. So we need to know about some of the usage and applications-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selection and indexing&lt;/li&gt;
&lt;li&gt;Conditional selection&lt;/li&gt;
&lt;li&gt;Creating new column&lt;/li&gt;
&lt;li&gt;Removing column-row&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Selection and indexing:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Selecting a row-column:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwzmhvtxwt7dbed9xfqoe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwzmhvtxwt7dbed9xfqoe.png" alt="selection" width="800" height="426"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Syntax:&lt;/strong&gt;&lt;br&gt;
Column selection: &lt;strong&gt;arr[column]&lt;/strong&gt;- returns a series&lt;br&gt;
Row selection: &lt;strong&gt;arr.loc[row]&lt;/strong&gt;- returns a series&lt;br&gt;
Row selection: &lt;strong&gt;arr.iloc[row number(starts from 0)]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futzgtkoicwuhazv4odwq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futzgtkoicwuhazv4odwq.png" alt="column" width="457" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd5xi3ey5hzt10esrnli.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd5xi3ey5hzt10esrnli.png" alt="row" width="459" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Selecting range:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  By rows-
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nwpxqqxnacml1iwivv7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nwpxqqxnacml1iwivv7.png" alt="select range" width="550" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  By columns-
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzobhnssrz9rnkgwmtcbd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzobhnssrz9rnkgwmtcbd.png" alt="range select col" width="552" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Selecting data:
&lt;/h3&gt;

&lt;p&gt;By combining previous methods we can get a data from the dataframe&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb08wd607246iwp1c50zy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb08wd607246iwp1c50zy.png" alt="data selection" width="461" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conditional Selection:
&lt;/h3&gt;

&lt;p&gt;Here we apply condition. If we just apply condition, it gives us boolean result. If we call the dataframe then it gives us values true to the condition and NaN in the false ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyl5bhodut7rsi0kbry6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyl5bhodut7rsi0kbry6w.png" alt="cond. select" width="546" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9g9pdzyjcj59m67uxpq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9g9pdzyjcj59m67uxpq.png" alt="cond. select" width="659" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can even combine conditions by 'and'/'or'. But here in pandas to combine conditions we use &lt;strong&gt;'&amp;amp;'&lt;/strong&gt;/&lt;strong&gt;'|'&lt;/strong&gt; instead of &lt;strong&gt;'and'/'or'&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gf1k4wskk51ynvo6x6s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gf1k4wskk51ynvo6x6s.png" alt="17" width="578" height="285"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5slxr0giphu2xpvztyz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5slxr0giphu2xpvztyz.png" alt="18" width="703" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating columns:
&lt;/h2&gt;

&lt;p&gt;syn: arr[column name]=data of the column&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi561d1j0fm14ww3zd2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi561d1j0fm14ww3zd2x.png" alt="19" width="647" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Removing row-column:
&lt;/h2&gt;

&lt;p&gt;axis=0 -&amp;gt; Row&lt;br&gt;
axis=1 -&amp;gt; Column&lt;br&gt;
&lt;code&gt;inplace=True&lt;/code&gt; is used to make the change permanent&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjg82pm6j0dmwdhxaeihm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjg82pm6j0dmwdhxaeihm.png" alt="20" width="684" height="315"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3jnvvvzhf2u2e8qqk2k3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3jnvvvzhf2u2e8qqk2k3.png" alt="21" width="556" height="239"&gt;&lt;/a&gt;&lt;br&gt;
by default axis=0&lt;/p&gt;

&lt;h2&gt;
  
  
  Missing value:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Adding missing value:
&lt;/h3&gt;

&lt;p&gt;use np.nan in data&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F869ygubyvmmol1f5f2pl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F869ygubyvmmol1f5f2pl.png" alt="23" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Removing NaN:
&lt;/h3&gt;

&lt;p&gt;By default &lt;code&gt;.dropna()&lt;/code&gt; removes row with NaN&lt;br&gt;
For column use &lt;code&gt;.dropna(axis=1)&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9ap7lhqzx2m6zcuagqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9ap7lhqzx2m6zcuagqa.png" alt="24" width="679" height="418"&gt;&lt;/a&gt;&lt;br&gt;
We can also spare row or columns with certain number of true values &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgnxs7ybm3s8h5bani8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgnxs7ybm3s8h5bani8l.png" alt="25" width="713" height="232"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbktgr799c8c1rk7wuvwg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbktgr799c8c1rk7wuvwg.png" alt="26" width="790" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Filling missing values:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F781h90zxq8bd5726rape.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F781h90zxq8bd5726rape.png" alt="27" width="719" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Groupby:
&lt;/h2&gt;

&lt;p&gt;We can group common data in a column and work with them&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rn9guvuw8cxxcdabav9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rn9guvuw8cxxcdabav9.png" alt="28" width="800" height="109"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbtysgeqysljt0tou335.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbtysgeqysljt0tou335.png" alt="29" width="800" height="255"&gt;&lt;/a&gt;&lt;br&gt;
After &lt;code&gt;.groupby()&lt;/code&gt; all common data gets stored...it doesn't print other then when we work with them. Like-&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdyeqxur34pjmzrg6homa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdyeqxur34pjmzrg6homa.png" alt="30" width="800" height="196"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9fwmruw1biw48wffmwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9fwmruw1biw48wffmwp.png" alt="31" width="800" height="245"&gt;&lt;/a&gt;&lt;br&gt;
try &lt;code&gt;.min()&lt;/code&gt;, &lt;code&gt;.max()&lt;/code&gt;, &lt;code&gt;.describe()&lt;/code&gt;, &lt;code&gt;.mean()&lt;/code&gt; etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Concatenating, Merging, Joining:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Concatenating:
&lt;/h3&gt;

&lt;p&gt;to attach column-wise or row-wise: &lt;code&gt;pd.concat([],axis= )&lt;/code&gt; by default axis=0&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc1rq5lvc1lyd2gxez4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc1rq5lvc1lyd2gxez4p.png" alt="32" width="800" height="379"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedpc35smp9qiyk04b0wq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedpc35smp9qiyk04b0wq.png" alt="33" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Merging:
&lt;/h3&gt;

&lt;p&gt;to attach regarding common column&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fob0byw0yyu5lavhf4lmq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fob0byw0yyu5lavhf4lmq.png" alt="34" width="800" height="205"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv347d886ui8ld8v4py0k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv347d886ui8ld8v4py0k.png" alt="35" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Joining:
&lt;/h3&gt;

&lt;p&gt;to attach regarding common index&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvctezct65ev7liaaz9n4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvctezct65ev7liaaz9n4.png" alt="36" width="800" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ls36h3u8yimhb5fdy3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ls36h3u8yimhb5fdy3v.png" alt="37" width="800" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fusef479j6eafmifn06xx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fusef479j6eafmifn06xx.png" alt="38" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was the basics of pandas. It is really the fundamental stuff. There are features related to file handling, data analysis, plotting etc.&lt;br&gt;
Let's keep exploring...let's dive together😉&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Numpy Basics-My experience</title>
      <dc:creator>MdMusfikurRahmanSifar</dc:creator>
      <pubDate>Sun, 25 Dec 2022 16:21:45 +0000</pubDate>
      <link>https://dev.to/mdmusfikurrahmansifar/numpy-basics-my-experience-57g</link>
      <guid>https://dev.to/mdmusfikurrahmansifar/numpy-basics-my-experience-57g</guid>
      <description>&lt;p&gt;Numpy is a python library.&lt;br&gt;
One of the most famous ones. Numpy stands for numerical python.&lt;br&gt;
It is used for working with arrays. &lt;br&gt;
Array is like python list but it is more than just list. It is faster than list and also consumes less storage. It's like in math what we call 'matrix'. All that we do with matrices in math we can do with array in numpy in programming rather, using the same theme, numpy has huge amount of other features. It allows us to use data and visualise in a matrix themed way and it is really powerful.&lt;/p&gt;

&lt;p&gt;I mentioned previously in &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.linkedin.com/posts/md-musfikur-rahman-sifar-96ab09258_mlabrwithabrmitul-diveabrwithabrsifar-activity-7006998327942615040-8W6w?utm_source=share&amp;amp;amp%3Butm_medium=member_desktop" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstatic.licdn.com%2Fscds%2Fcommon%2Fu%2Fimages%2Femail%2Fartdeco%2Flogos%2F96%2Flinkedin-bug-color.png" height="96" class="m-0" width="96"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.linkedin.com/posts/md-musfikur-rahman-sifar-96ab09258_mlabrwithabrmitul-diveabrwithabrsifar-activity-7006998327942615040-8W6w?utm_source=share&amp;amp;amp%3Butm_medium=member_desktop" rel="noopener noreferrer" class="c-link"&gt;
          #ml_with_mitul #dive_with_sifar | Md Musfikur Rahman Sifar
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Week-1
Experience from Basics of Python

From my journey of learning python so far, I would describe my experience and understandings in three parts-Notes from…
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstatic.licdn.com%2Faero-v1%2Fsc%2Fh%2Fal2o9zrvru7aqj8e1x2rzsrca" width="800" height="400"&gt;
        linkedin.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
what are the basic terms and subtopics of basic python. We always need to keep in mind about those after all we are using python. Here we also have those common topics like slicing, operating etc. So we can easily relate them. So, following that here is the list of the basic topics-

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Creating arrays&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Array attributes and methods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Slicing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operating&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Creating Arrays
&lt;/h2&gt;

&lt;p&gt;we can create arrays two ways-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Conversion from other python structures&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Intrinsic numpy creation objects&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Conversion from other python structures(From lists, tuple, etc)
&lt;/h3&gt;

&lt;p&gt;Firstly, we need to import numpy. We can use numpy as np.&lt;br&gt;
&lt;code&gt;import numpy as np&lt;/code&gt;&lt;br&gt;
We use &lt;code&gt;array()&lt;/code&gt;to create array. The syntax is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import numpy as np
arr=np.array()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;array() takes arguements where we can give input.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyr95uppbakvdmdab3rfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyr95uppbakvdmdab3rfc.png" alt="arrays creating" width="800" height="294"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiz35k5qf3vh4sy187a3c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiz35k5qf3vh4sy187a3c.png" alt="print" width="800" height="217"&gt;&lt;/a&gt;&lt;br&gt;
We can create multi-dimensional arrays by putting'[]'&lt;br&gt;
and check the dimension by putting &lt;code&gt;.ndim&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Trick: Dimension=Number of '[' from one side
&lt;/h6&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1p1dqmy4bvev0ozcwg75.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1p1dqmy4bvev0ozcwg75.png" alt="array dim" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fec7hsusmxurebd73rwa4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fec7hsusmxurebd73rwa4.png" alt="print" width="800" height="101"&gt;&lt;/a&gt;&lt;br&gt;
We can take multiple arguments&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcr2eneo7pji2nth3ze7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcr2eneo7pji2nth3ze7b.png" alt="mul arg" width="800" height="168"&gt;&lt;/a&gt;&lt;br&gt;
There's also different datatypes..I don't know much about them yet😅&lt;/p&gt;

&lt;h3&gt;
  
  
  Intrinsic numpy creation objects(arange,zeros,ones etc.)
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;.arange(start_inclusive,end_exclusive,step)&lt;/code&gt;-creates array within the range of number serially&lt;br&gt;
&lt;code&gt;.zeros((row number,column number))&lt;/code&gt;-returns array only with 0&lt;br&gt;
&lt;code&gt;.ones((row number,column number))&lt;/code&gt;-returns array only with 1&lt;br&gt;
&lt;code&gt;.identity((row-column number))&lt;/code&gt;-return identity matrix&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dqif85onemfmvwoy517.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dqif85onemfmvwoy517.png" alt="methods" width="770" height="291"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fznbrjeqj4cxvx3wq68w3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fznbrjeqj4cxvx3wq68w3.png" alt="print" width="634" height="276"&gt;&lt;/a&gt;&lt;br&gt;
We can also create random numbers:&lt;br&gt;
&lt;code&gt;.random.rand((row_number,column_number))&lt;/code&gt;-creates random number in [0,1) range&lt;br&gt;
&lt;code&gt;.random.randn((row_number,column_number))&lt;/code&gt;-Return a sample (or samples) from the "standard normal" distribution. Unlike rand which is uniform&lt;br&gt;
&lt;code&gt;.random.randint((start_inclusive,end_inclusive,total numbers))&lt;/code&gt;-random numbers within a range&lt;/p&gt;

&lt;h2&gt;
  
  
  Array attributes and methods
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;.max()&lt;/code&gt;-returns the maximum entry&lt;br&gt;
&lt;code&gt;.min()&lt;/code&gt;-returns the minimum entry&lt;br&gt;
&lt;code&gt;.argmax()&lt;/code&gt;-returns the index of max value&lt;br&gt;
&lt;code&gt;.argmin()&lt;/code&gt;-returns the index of min value&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45at20kshnu71i9qhkcq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45at20kshnu71i9qhkcq.png" alt="arrtributes" width="800" height="308"&gt;&lt;/a&gt;&lt;br&gt;
We can also see the shape of the array and also reshape it &lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt;For reshape it must be total entries=new_row*new_column &lt;br&gt;
&lt;code&gt;.shape&lt;/code&gt;-to know the shape of the matrix&lt;br&gt;
&lt;code&gt;.reshape&lt;/code&gt;-to reshape&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2te6f2d03vm6ygf8tsp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2te6f2d03vm6ygf8tsp.png" alt="attr" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Slicing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt;&lt;br&gt;
arrayname[rowstart_inclusive:rowend_exclusive,columnstart_inclusive:columnend_exclusive]&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt;careful about inclusive and exclusive&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7bnx6hfprx0np1viin4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7bnx6hfprx0np1viin4.png" alt="Slicing" width="707" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Operating
&lt;/h2&gt;

&lt;p&gt;It is like regular operation in math&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foci2myleioyi69livle4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foci2myleioyi69livle4.png" alt="Operation" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are also other methods and attributes like-&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnve27xz7xrxtzls803mk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnve27xz7xrxtzls803mk.png" alt="extra" width="800" height="220"&gt;&lt;/a&gt;&lt;br&gt;
More we explore more we know about these things and play with them&lt;/p&gt;

&lt;h2&gt;
  
  
  Experience:
&lt;/h2&gt;

&lt;p&gt;Numpy gets really easy to understand when you relate it with matrix. Know your methods and attributes. But need to be careful about syntax. It was the biggest challenge for me.&lt;/p&gt;

&lt;p&gt;There are many other features. It will get even amazing..Still at the beginning...let's continue learning...let's dive together.&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
