{"id":95824,"date":"2025-09-27T18:28:31","date_gmt":"2025-09-27T18:28:31","guid":{"rendered":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/"},"modified":"2025-09-27T18:31:09","modified_gmt":"2025-09-27T18:31:09","slug":"how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data","status":"publish","type":"post","link":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/","title":{"rendered":"How to Use pandas DataFrames in Python to Analyze and Manipulate Data"},"content":{"rendered":"<p> <a href=\"https:\/\/go.fiverr.com\/visit\/?bta=1052423&nci=17043\" Target=\"_Top\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"https:\/\/fiverr.ck-cdn.com\/tn\/serve\/?cid=40081059\"  width=\"601\" height=\"201\"><\/a>\n<\/p>\n<div>\n<p>If you wish to analyze information in Python, you will wish to change into acquainted with pandas, because it makes information evaluation a lot simpler. The DataFrame is the first information format you will work together with. Here is how one can make use of it.<\/p>\n<p>    <!-- No AdsNinja v10 Client! --><!-- No AdsNinja v10 Client! --><\/p>\n<h2 id=\"what-is-pandas\">\n                        What&#8217;s pandas?<br \/>\n               <\/h2>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:45.560871876661%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=800&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=800&amp;dpr=2\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=825&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=825&amp;dpr=2\"\/><img width=\"1650\" height=\"752\" loading=\"lazy\" decoding=\"async\" alt=\"The pandas official website.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=825&amp;dpr=2\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-homepage.png?q=49&amp;fit=crop&amp;w=825&amp;dpr=2\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> <a href=\"https:\/\/pandas.pydata.org\/\" rel=\"noopener noreferrer\" target=\"_blank\">pandas<\/a> is a Python module that is fashionable in information science and information evaluation. It is affords a method to set up information into DataFrames and affords numerous operations you&#8217;ll be able to carry out on this information. It was initially developed by AQR Capital Administration, nevertheless it was open-sourced within the late 2000s.<\/p>\n<p>To put in pandas utilizing PyPI:<\/p>\n<pre>\n        <code class=\"hljs bash\">pip set up pandas<br\/><\/code>\n    <\/pre>\n<p>It is best to work with pandas utilizing <a href=\"https:\/\/www.howtogeek.com\/how-to-get-started-creating-interactive-notebooks-in-jupyter\/\" target=\"_blank\">a Jupyter notebook<\/a> or different interactive Python session. <a href=\"https:\/\/www.howtogeek.com\/why-ipython-is-better-than-the-standard-python-interpreter\/\" target=\"_blank\">IPython is great for casual explorations of data in the terminal<\/a>, however Jupyter will save a file of your calculations, which is useful whenever you return to a dataset days or perhaps weeks later and battle to recollect what you probably did. I&#8217;ve created my very own pocket book of code examples you&#8217;ll be able to look at on <a href=\"https:\/\/github.com\/ddelony\/stats\/blob\/main\/pandas-dataframe-demo.ipynb\" rel=\"noopener noreferrer\" target=\"_blank\">my GitHub page<\/a>. That is the place the screenshots you will see got here from.<\/p>\n<h2 id=\"what-is-a-dataframe\">\n                        What&#8217;s a DataFrame?<br \/>\n               <\/h2>\n<p>A DataFrame is the first information construction that you simply work with in pandas. Like a spreadsheet or relational database, it organizes information into rows and columns. Columns are grouped by a header title. The idea is just like R information frames, one other programming language fashionable in statistics and information science. DataFrame columns can maintain each textual content and numeric information, together with integers and floating-point numbers. Columns may also comprise time collection information.<\/p>\n<h2 id=\"how-to-create-a-dataframe\">\n                        Easy methods to Create a DataFrame<br \/>\n               <\/h2>\n<p>Assuming you have already got pandas put in, you&#8217;ll be able to create a small DataFrame from different parts.<\/p>\n<p>I will create columns representing a linear operate that could possibly be used for regression evaluation later. First, I will create the x-axis, or the impartial variable, from a NumPy array:<\/p>\n<pre>\n        <code class=\"hljs python\"><span class=\"hljs-keyword\">import<\/span> numpy <span class=\"hljs-keyword\">as<\/span> np<br\/>x = np.linspace(<span class=\"hljs-number\">-10<\/span>,<span class=\"hljs-number\">10<\/span>)<br\/><\/code>\n    <\/pre>\n<p>Subsequent, I will create the y column or dependent variable as a easy linear operate:<\/p>\n<pre>\n        <code class=\"hljs python\">y = <span class=\"hljs-number\">2<\/span>*x + <span class=\"hljs-number\">5<\/span><\/code>\n    <\/pre>\n<p>Now I will <a href=\"https:\/\/www.howtogeek.com\/how-to-use-libraries-in-python-to-do-more-with-less-code\/\" target=\"_blank\">import<\/a> pandas and create the DataFrame.<\/p>\n<pre>\n        <code class=\"hljs python\"><span class=\"hljs-keyword\">import<\/span> pandas <span class=\"hljs-keyword\">as<\/span> pd<\/code>\n    <\/pre>\n<p>As with NumPy, shortening the title of pandas will make it simpler to kind.<\/p>\n<p>pandas&#8217; DataFrame methodology takes a dictionary of the names of the columns and the lists of the particular information. I will create a DataFrame named &#8220;df&#8221; with columns labeled &#8220;x&#8221; and &#8220;y.&#8221; The info would be the NumPy arrays I created earlier.<\/p>\n<pre>\n        <code class=\"hljs python\"><br\/>df = pd.DataFrame({<span class=\"hljs-string\">'x'<\/span>:x,<span class=\"hljs-string\">'y'<\/span>:y})<br\/><\/code>\n    <\/pre>\n<h2 id=\"importing-a-dataframe\">\n                        Importing a DataFrame<br \/>\n               <\/h2>\n<p>Whereas it is attainable to create DataFrames from scratch, it is extra frequent to import the information from one other supply. As a result of the DataFrame content material is tabular, spreadsheets are a preferred supply. The highest values of the spreadsheet will change into the column names.<\/p>\n<p>To learn in an Excel spreadsheet, use the read_excel methodology:<\/p>\n<pre>\n        <code class=\"hljs python\"><br\/>df = pd.read_excel(<span class=\"hljs-string\">'\/path\/to\/spreadsheet.xls'<\/span>)<br\/><\/code>\n    <\/pre>\n<p>Being an open-source fan,<a href=\"https:\/\/www.howtogeek.com\/thread\/is-libreoffice-good-enough-to-replace-microsoft-office\/\" target=\"_blank\"> I tend to gravitate toward LibreOffice Calc rather than Excel<\/a>, however I may also import different file varieties. The .csv format is extensively used, and I can export my information in that format.<\/p>\n<pre>\n        <code class=\"hljs python\"><br\/>df = pd.read_csv(<span class=\"hljs-string\">'\/path\/to\/information.csv'<\/span>)<br\/><\/code>\n    <\/pre>\n<p>A helpful function is the power to repeat from the clipboard. That is nice for smaller datasets to get to extra superior calculations than I can get in a spreadsheet:<\/p>\n<pre>\n        <code class=\"hljs python\"><br\/>df = pd.read_clipboard()<br\/><\/code>\n    <\/pre>\n<h2 id=\"examining-a-dataframe\">\n                        Inspecting a DataFrame<br \/>\n               <\/h2>\n<p>Now that you have created a DataFrame, the subsequent step is to look at the information in it.<\/p>\n<p>A method to try this is to get the primary 5 rows of the DataFrame with the pinnacle methodology<\/p>\n<pre>\n        <code class=\"hljs python\">df.head()<br\/><\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:35.046248715313%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"289\" loading=\"lazy\" decoding=\"async\" alt=\"pandas DataFrame head of &quot;df&quot; showing x and y columns.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> I&#8217;ve you have ever used <a href=\"https:\/\/www.howtogeek.com\/how-to-use-the-head-command-on-linux\/\" target=\"_blank\">the head command on Linux<\/a> or different Unix-like methods, that is related. If you realize about <a href=\"https:\/\/www.howtogeek.com\/481766\/how-to-use-the-tail-command-on-linux\/\" target=\"_blank\">the tail command<\/a>, there is a related methodology in pandas that will get the final traces of a DataFrame<\/p>\n<pre>\n        <code class=\"hljs python\"><br\/>df.tail()<br\/><\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:30.601659751037%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"252\" loading=\"lazy\" decoding=\"async\" alt=\"pandas tail (last five lines) of df DataFrame.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-dataframe-tail.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> You need to use array slicing strategies to view a exact subset of traces. To view traces 1 by means of 3:<\/p>\n<pre>\n        <code class=\"hljs python\">df[<span class=\"hljs-number\">1<\/span>:<span class=\"hljs-number\">3<\/span>]<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:24.175824175824%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"199\" loading=\"lazy\" decoding=\"async\" alt=\"dataframe-array-sliceDataFrane array slice.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-array-slice.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> With the pinnacle command in Linux, you&#8217;ll be able to view a precise variety of traces with a numerical arguement. You are able to do the identical factor in pandas. To see the primary 10 traces:<\/p>\n<pre>\n        <code class=\"hljs python\">df.head(<span class=\"hljs-number\">10<\/span>)<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:50.463439752832%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"416\" loading=\"lazy\" decoding=\"async\" alt=\"DataFrame head showing first 10 rows.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-head-10.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> The tail methodology works similarly.<\/p>\n<pre>\n        <code class=\"hljs python\">df.tail(<span class=\"hljs-number\">10<\/span>)<\/code>\n    <\/pre>\n<p>Extra fascinating is to look at present datasets. A well-liked method to show that is with the dataset of passengers on the Titanic. It is accessible on <a href=\"https:\/\/www.kaggle.com\/datasets\/yasserh\/titanic-dataset\" rel=\"noopener noreferrer\" target=\"_blank\">Kaggle<\/a>. Numerous different statistical libraries like <a href=\"https:\/\/seaborn.pydata.org\/index.html\" rel=\"noopener noreferrer\" target=\"_blank\">Seaborn<\/a> and <a href=\"https:\/\/pingouin-stats.org\/build\/html\/index.html\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Pingouin<\/a> will allow you to load in instance datasets so you do not have to obtain them. pandas DataFrames may also largely be used for feeding information into these libraries, resembling to <a href=\"https:\/\/www.howtogeek.com\/how-i-explore-and-visualize-data-with-python-and-seaborn\/\" target=\"_blank\">make a plo<\/a>t or <a href=\"https:\/\/www.howtogeek.com\/regression-in-python-how-to-find-relationships-in-your-data\/\" target=\"_blank\">calculate a linear regression<\/a>.<\/p>\n<p>With the information downloaded, you will need to import it:<\/p>\n<pre>\n        <code class=\"hljs python\">titanic = pd.read_csv(<span class=\"hljs-string\">'information\/Titanic-Dataset.csv'<\/span>)<\/code>\n    <\/pre>\n<p>Let&#8217;s take a look at the pinnacle once more<\/p>\n<pre>\n        <code class=\"hljs python\">titanic.head()<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:23.965651834504%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"198\" loading=\"lazy\" decoding=\"async\" alt=\"pandas head of Titanic passengers dataset.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-head.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> We are able to additionally see all of the columns with the columns methodology<\/p>\n<pre>\n        <code class=\"hljs python\">titanic.columns<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:13.004032258065%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"107\" loading=\"lazy\" decoding=\"async\" alt=\"pandas columns of Titanic passenger dataset.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-pandas-columns.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> pandas affords lots of strategies for getting information concerning the dataset. The describe methodology affords some descriptive statistics of all of the numerical columns within the DataFrame.<\/p>\n<pre>\n        <code class=\"hljs python\">titanic.describe()<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:41.717171717172%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"344\" loading=\"lazy\" decoding=\"async\" alt=\"Descriptive statistics of the Titanic dataset.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> First is the imply, or common. Subsequent is the usual deviation, or how shut or tightly the values are spaced across the imply. Subsequent comes the minimal worth, the decrease quartile or the twenty fifth percentile, the median, or fiftieth percentile, the higher quartile or seventy fifth percentile, and the utmost worth. These values make up legendary statistician John Tukey&#8217;s &#8220;five-number abstract.&#8221; You may shortly see how your information is distributed utilizing these numbers.<\/p>\n<p>To entry a column by itself, name the title of the DataFrame with the title of the column in sq. brackets(&#8216;[]&#8217;)<\/p>\n<p>For instance, to view the column with the title of the passengers:<\/p>\n<pre>\n        <code class=\"hljs python\">titanic[<span class=\"hljs-string\">'Name'<\/span>]<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:34.204793028322%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"282\" loading=\"lazy\" decoding=\"async\" alt=\"Passenger names column of the Titanic dataset.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-column.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> As a result of the checklist is so lengthy, it will likely be truncated by default. To see all the checklist of names, use the to_string methodology.<\/p>\n<pre>\n        <code class=\"hljs python\">titanic[<span class=\"hljs-string\">'Name'<\/span>].to_string()<\/code>\n    <\/pre>\n<p>You too can flip truncation off. To show it off with columns with a lot of rows:<\/p>\n<pre>\n        <code class=\"hljs python\">pd.set_option(<span class=\"hljs-string\">'show.max_rows'<\/span>, <span class=\"hljs-literal\">None<\/span>)<\/code>\n    <\/pre>\n<p>You too can use different strategies when deciding on by row. To see the descriptive statistics on one column:<\/p>\n<pre>\n        <code class=\"hljs python\">titanic[<span class=\"hljs-string\">'Age'<\/span>].describe()<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:27.413984461709%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"226\" loading=\"lazy\" decoding=\"async\" alt=\"pandas descriptive statistics of the age column of the Titanic passenger dataset.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-descriptive-stats.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> You too can entry particular person values<\/p>\n<pre>\n        <code class=\"hljs python\">titanic[<span class=\"hljs-string\">'Age'<\/span>].imply()<br\/>titanic[<span class=\"hljs-string\">'Age'<\/span>].median()<br\/><\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:18.20987654321%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"150\" loading=\"lazy\" decoding=\"async\" alt=\"Mean and median of Titanic passengers from the dataset.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-age-mean-median.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<h2 id=\"adding-and-deleting-columns\">\n                        Including and Deleting Columns<br \/>\n               <\/h2>\n<p>Not solely are you able to look at columns, you&#8217;ll be able to add new ones as effectively. You may add a column a populate it with values, as you&#8217;ll with a Python array, however you may also rework information and add it to new columns.<\/p>\n<p>Let&#8217;s return to the unique DataFrame we created, df. We are able to carry out operations on each ingredient in a column. For instance, to sq. the x column:<\/p>\n<pre>\n        <code class=\"hljs python\">df[<span class=\"hljs-string\">'x'<\/span>]**<span class=\"hljs-number\">2<\/span><\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:35.323886639676%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"291\" loading=\"lazy\" decoding=\"async\" alt=\"pandas DataFrame x column squared.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/dataframe-column-squared.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> We are able to create a brand new column with these values:<\/p>\n<pre>\n        <code class=\"hljs python\">df[<span class=\"hljs-string\">'x2'<\/span>] = df[<span class=\"hljs-string\">'x'<\/span>]**<span class=\"hljs-number\">2<\/span><\/code>\n    <\/pre>\n<p>To delete a column, you should utilize the drop operate<\/p>\n<pre>\n        <code class=\"hljs python\">df.drop(<span class=\"hljs-string\">'x2'<\/span>,axis=<span class=\"hljs-number\">1<\/span>)<\/code>\n    <\/pre>\n<p>The axis argument tells pandas to function by columns as an alternative of rows.<\/p>\n<h2 id=\"performing-operations-on-columns\">\n                        Performing Operations on Columns<br \/>\n               <\/h2>\n<p>As alluded to earlier, you&#8217;ll be able to carry out operations on columns. You may carry out mathematical and statistical operations on them.<\/p>\n<p>We are able to add our x and y columns collectively:<\/p>\n<pre>\n        <code class=\"hljs python\">df[<span class=\"hljs-string\">'x'<\/span>] + df[<span class=\"hljs-string\">'y'<\/span>]<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:43.172268907563%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"356\" loading=\"lazy\" decoding=\"async\" alt=\"Pandas df DataFrame x column plus y column.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/pandas-x-plus-y.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> You may choose a number of columns with double brackets.<\/p>\n<p>To see the names and ages of the Titanic passengers:<\/p>\n<pre>\n        <code class=\"hljs python\">titanic[[<span class=\"hljs-string\">'Name'<\/span>,<span class=\"hljs-string\">'Age'<\/span>]]<br\/><\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:58.411703239289%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"482\" loading=\"lazy\" decoding=\"async\" alt=\"Titanic name and age columns from the pandas DataFrame.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-name-age.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> The column parts have to be separated by a comma (,) character.<\/p>\n<p>You too can search pandas DataFrames, just like SQL searches. To see the rows of passengers who had been older than 30 after they boarded the ill-fated liner, you should utilize a Boolean choice contained in the brackets:<\/p>\n<pre>\n        <code class=\"hljs python\">titanic[titanic[<span class=\"hljs-string\">'Age'<\/span>] &gt; <span class=\"hljs-number\">30<\/span>]<\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:40.425531914894%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"334\" loading=\"lazy\" decoding=\"async\" alt=\"pandas Titanic DataFrame showing rows of passengers over the age of 30.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-dataframe-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> That is just like the SQL assertion:<\/p>\n<pre>\n        <code class=\"hljs sql\"><span class=\"hljs-keyword\">SELECT<\/span> * <span class=\"hljs-keyword\">FROM<\/span> titanic <span class=\"hljs-keyword\">WHERE<\/span> Age &gt; <span class=\"hljs-number\">30<\/span><\/code>\n    <\/pre>\n<p>You may choose the column through the use of .loc earlier than the brackets:<\/p>\n<pre>titanic.loc [titanic['Age'] &gt; 30]<\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:33.587786259542%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"277\" loading=\"lazy\" decoding=\"async\" alt=\"pandas age column of Titanic passengers over 30.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-passengers-over-30.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> Let&#8217;s make a bar plot of the place the Titanic passengers embarked. We are able to make our personal subset of the DataFrame with the three factors of embarkation, Southampton, England; Cherbourg, France; and Queenstown, Eire (now Cobh).<\/p>\n<pre>\n        <code class=\"hljs python\">embarked = titanic[<span class=\"hljs-string\">'Embarked'<\/span>].value_counts()<\/code>\n    <\/pre>\n<p>This can create a brand new DataFrame with the quantity of people that embarked at every port. However we&#8217;ve an issue. The column headers are merely letters standing for the title of the port. Let&#8217;s substitute them with the total names of the port. The rename methodology will take a dictionary of the outdated names and the brand new ones.<\/p>\n<pre>\n        <code class=\"hljs python\">embarked = embarked.rename({<span class=\"hljs-string\">'S'<\/span>:<span class=\"hljs-string\">'Southhampton'<\/span>,<span class=\"hljs-string\">'C'<\/span>:<span class=\"hljs-string\">'Cherbourg'<\/span>,<span class=\"hljs-string\">'Q'<\/span>:<span class=\"hljs-string\">'Queenstown'<\/span>})<\/code>\n    <\/pre>\n<p>With the columns renamed, we are able to make our bar chart. That is straightforward with pandas:<\/p>\n<pre>\n        <code class=\"hljs python\">embarked.plot(variety=<span class=\"hljs-string\">'bar'<\/span>)<br\/><\/code>\n    <\/pre>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:60.816681146829%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=49&amp;fit=crop&amp;w=500&amp;dpr=2\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"502\" loading=\"lazy\" decoding=\"async\" alt=\"Displaying a bar chart with ports that passengers embarked on the Titanic at.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/09\/titanic-embarked-bar-chart.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<hr\/>\n<p>This could provide help to get began exploring pandas datasets. pandas is one cause that Python has change into so fashionable with statisticians, information scientists, and anybody who must discover information.<\/p>\n<\/p><\/div>\n<iframe src=\"https:\/\/www.fiverr.com\/gig_widgets?id=U2FsdGVkX18x7XQvttUTrv1oEqmGNGTgvvCUiUoJ\/AP4z\/UyMz8lXGOLpu15jIMxBbTR0gmD5uBoFvhC4KWeALQRp3h\/X\/AwcVD0K8Wj9H\/ZzYKzcCNHosB9oS4SCJJFWiN85P9ICAc4OgCoE\/wHKIY7CDkf2\/DQ1vqGvk4smVe5cRDEmrLPCWi4FC8p40VUhSmWQ5udCm0zoJtorgWv3vbDQw0kKYkwn39ozAnQXDe+YvWMxkLFWA+O3TFwkJvdkIK+\/AUSnRssPKt5WHY0FhNOxnSPcLslEL4G4\/RfP95ve99U+kRnDy3X+KtzdQLY+u935ghON\/o3UE4IMv9oN6JX9RnxzL\/LRcOgnHigxStSGPKsZYtnz8RWNVT\/rOLAibqiWJadC5MYHRbekF3eg6FOGrQGkXYbsn0+a5aovnlLCbLwIqY9fcS17UX8J235iQ6cdmHNbrPeS84CMm34RA==&affiliate_id=1052423&strip_google_tagmanager=true\" loading=\"lazy\" data-with-title=\"true\" class=\"fiverr_nga_frame\" frameborder=\"0\" height=\"350\" width=\"100%\" referrerpolicy=\"no-referrer-when-downgrade\" data-mode=\"random_gigs\" onload=\" var frame = this; var script = document.createElement('script'); script.addEventListener('load', function() { window.FW_SDK.register(frame); }); script.setAttribute('src', 'https:\/\/www.fiverr.com\/gig_widgets\/sdk'); document.body.appendChild(script); \" ><\/iframe>\n<br \/><a href=\"https:\/\/www.howtogeek.com\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you wish to analyze information in Python, you will wish to change into acquainted with pandas, because it makes information evaluation a lot simpler&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":95825,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-95824","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-universe"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Use pandas DataFrames in Python to Analyze and Manipulate Data - mailinvest.blog<\/title>\n<meta name=\"description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use pandas DataFrames in Python to Analyze and Manipulate Data - mailinvest.blog\" \/>\n<meta property=\"og:description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/\" \/>\n<meta property=\"og:site_name\" content=\"mailinvest.blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/freelanceracademic\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-27T18:28:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-27T18:31:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mailinvest.blog\/wp-content\/uploads\/2025\/09\/python-seaborn-logo-chart.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@mailinvest.blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@mailinvest.blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/\"},\"author\":{\"name\":\"admin@mailinvest.blog\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\"},\"headline\":\"How to Use pandas DataFrames in Python to Analyze and Manipulate Data\",\"datePublished\":\"2025-09-27T18:28:31+00:00\",\"dateModified\":\"2025-09-27T18:31:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/\"},\"wordCount\":1414,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/python-seaborn-logo-chart.jpg\",\"articleSection\":[\"Tech Universe\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/\",\"name\":\"How to Use pandas DataFrames in Python to Analyze and Manipulate Data - mailinvest.blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/python-seaborn-logo-chart.jpg\",\"datePublished\":\"2025-09-27T18:28:31+00:00\",\"dateModified\":\"2025-09-27T18:31:09+00:00\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#primaryimage\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/python-seaborn-logo-chart.jpg\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/python-seaborn-logo-chart.jpg\",\"width\":1600,\"height\":900},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2025\\\/09\\\/27\\\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mailinvest.blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use pandas DataFrames in Python to Analyze and Manipulate Data\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"name\":\"mailinvest.blog\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mailinvest.blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\",\"name\":\"mailinvest\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"width\":1000,\"height\":1000,\"caption\":\"mailinvest\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/freelanceracademic\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\",\"name\":\"admin@mailinvest.blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"caption\":\"admin@mailinvest.blog\"},\"sameAs\":[\"https:\\\/\\\/mailinvest.blog\",\"admin@mailinvest.blog\"],\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/author\\\/adminmailinvest-blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use pandas DataFrames in Python to Analyze and Manipulate Data - mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/","og_locale":"en_US","og_type":"article","og_title":"How to Use pandas DataFrames in Python to Analyze and Manipulate Data - mailinvest.blog","og_description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","og_url":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/","og_site_name":"mailinvest.blog","article_publisher":"https:\/\/www.facebook.com\/freelanceracademic\/","article_published_time":"2025-09-27T18:28:31+00:00","article_modified_time":"2025-09-27T18:31:09+00:00","og_image":[{"width":1600,"height":900,"url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2025\/09\/python-seaborn-logo-chart.jpg","type":"image\/jpeg"}],"author":"admin@mailinvest.blog","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin@mailinvest.blog","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#article","isPartOf":{"@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/"},"author":{"name":"admin@mailinvest.blog","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4"},"headline":"How to Use pandas DataFrames in Python to Analyze and Manipulate Data","datePublished":"2025-09-27T18:28:31+00:00","dateModified":"2025-09-27T18:31:09+00:00","mainEntityOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/"},"wordCount":1414,"commentCount":0,"publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2025\/09\/python-seaborn-logo-chart.jpg","articleSection":["Tech Universe"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/","url":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/","name":"How to Use pandas DataFrames in Python to Analyze and Manipulate Data - mailinvest.blog","isPartOf":{"@id":"https:\/\/mailinvest.blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#primaryimage"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2025\/09\/python-seaborn-logo-chart.jpg","datePublished":"2025-09-27T18:28:31+00:00","dateModified":"2025-09-27T18:31:09+00:00","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","breadcrumb":{"@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#primaryimage","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2025\/09\/python-seaborn-logo-chart.jpg","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2025\/09\/python-seaborn-logo-chart.jpg","width":1600,"height":900},{"@type":"BreadcrumbList","@id":"https:\/\/mailinvest.blog\/index.php\/2025\/09\/27\/how-to-use-pandas-dataframes-in-python-to-analyze-and-manipulate-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mailinvest.blog\/"},{"@type":"ListItem","position":2,"name":"How to Use pandas DataFrames in Python to Analyze and Manipulate Data"}]},{"@type":"WebSite","@id":"https:\/\/mailinvest.blog\/#website","url":"https:\/\/mailinvest.blog\/","name":"mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mailinvest.blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mailinvest.blog\/#organization","name":"mailinvest","url":"https:\/\/mailinvest.blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","width":1000,"height":1000,"caption":"mailinvest"},"image":{"@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/freelanceracademic\/"]},{"@type":"Person","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4","name":"admin@mailinvest.blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","caption":"admin@mailinvest.blog"},"sameAs":["https:\/\/mailinvest.blog","admin@mailinvest.blog"],"url":"https:\/\/mailinvest.blog\/index.php\/author\/adminmailinvest-blog\/"}]}},"_links":{"self":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/95824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/comments?post=95824"}],"version-history":[{"count":1,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/95824\/revisions"}],"predecessor-version":[{"id":95826,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/95824\/revisions\/95826"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media\/95825"}],"wp:attachment":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media?parent=95824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/categories?post=95824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/tags?post=95824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}