{"id":7625,"date":"2025-04-04T07:02:36","date_gmt":"2025-04-04T07:02:36","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=7625"},"modified":"2025-04-04T07:19:08","modified_gmt":"2025-04-04T07:19:08","slug":"how-to-convert-pandas-dataframe-to-list","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/","title":{"rendered":"How to Convert Pandas Dataframe to List"},"content":{"rendered":"\n<p>Python developers commonly use Pandas dataframe to store data in tabular manner and analyze them using rows and columns. Sometimes, they may need to convert a Pandas dataframe to list in Python. This may be because they need to export data in a specific format or some other reason. In this article, we will learn how to convert Pandas dataframe to list.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#How_to_Convert_Pandas_Dataframe_to_List\" >How to Convert Pandas Dataframe to List<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#1_Convert_one_dataframe_column_to_list\" >1. Convert one dataframe column to list<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#2_Convert_all_columns_into_lists\" >2. Convert all columns into lists<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#3_Convert_Dataframe_into_Nested_List\" >3. Convert Dataframe into Nested List<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#4_Convert_Dataframe_into_list_with_column_names\" >4. Convert Dataframe into list with column names<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Convert_Pandas_Dataframe_to_List\"><\/span>How to Convert Pandas Dataframe to List<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the different ways to transform Pandas dataframe to list. Let us say you have the following Pandas dataframe.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pandas as pd<br>data = {'name':['john','jane','joe','jim'],  <br>             'age': [12,15,14,16] }  <br>df = pd.DataFrame(data)             <br>print(df)<br><br>## output<br>   name  age<br>0  john   12<br>1  jane   15<br>2   joe   14<br>3   jim   16<\/pre>\n\n\n\n<p>Every Pandas dataframe readily supports tolist() function that allows you to convert a dataframe into list.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Convert_one_dataframe_column_to_list\"><\/span>1. Convert one dataframe column to list<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this solution, we will learn how to convert one dataframe column into Python list. For this purpose, we will call tolist() function on the result of data for a single column. You can get the result of a single column using <em>dataframe[column_name]<\/em> command. Here is the command to get the result of name column.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print(df['name'])<br><br>## output<br><br>0    john<br>1    jane<br>2     joe<br>3     jim<\/pre>\n\n\n\n<p>When you call tolist() function on this column data, it will return the result as a list.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print(df['name'].tolist())<br><br>## output <br>['john', 'jane', 'joe', 'jim']<\/pre>\n\n\n\n<p>Similarly, you can convert every column&#8217;s data into a list.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Convert_all_columns_into_lists\"><\/span>2. Convert all columns into lists<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this approach, we will convert the given dataframe into a nested list of lists. For this, we loop through all the columns of dataframe, and for each column, we call the tolist() function, as we did in earlier approach. You can get a list of all column names using df.columns property.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print(df.columns) # output is Index(['name', 'age'], dtype='object')<\/pre>\n\n\n\n<p>We will loop through the output of df.columns to print the result of each column.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">for column in df.columns:<br>    print(df[column].tolist())<br><br>## output <br>['john', 'jane', 'joe', 'jim']<br>[12, 15, 14, 16]<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Convert_Dataframe_into_Nested_List\"><\/span>3. Convert Dataframe into Nested List<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the previous solution, we converted each column of dataframe into a separate list. In this approach, we will learn how to convert dataframe into nested list of lists, where each list contains data pertaining to one column. For this purpose, we use dataframe.values property that returns series object. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print(df.values)<br><br>## output<br><br>[['john' 12]<br> ['jane' 15]<br> ['joe' 14]<br> ['jim' 16]]<\/pre>\n\n\n\n<p>We directly call tolist() function on the above output.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print(df.values.tolist())<br><br>## output<br><br>[['john', 12], ['jane', 15], ['joe', 14], ['jim', 16]]<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Convert_Dataframe_into_list_with_column_names\"><\/span>4. Convert Dataframe into list with column names<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In all the above solutions, we have converted dataframe data into list, but excluded the column names. In this approach, we will also include columns names as another list. To get column names of a dataframe, we call dataframe.columns.values. We convert it into list using tolist() function.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print(df.columns.values.tolist()) # output is ['name', 'age']<\/pre>\n\n\n\n<p>We concatenate the result of above function to nested list obtained in previous solution.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">print([df.columns.values.tolist()]+ df.values.tolist())<br><br>## output <br>[['name', 'age'], ['john', 12], ['jane', 15], ['joe', 14], ['jim', 16]]<\/pre>\n\n\n\n<p>In the above code, we have stored the result of dataframe.columns.values.tolist() in an empty list. To this we have concatenated the result of dataframe.values.tolist() using concatenation operator &#8216;+&#8217;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt several different ways to convert pandas dataframe to list. You can use any of these methods as per your requirement. But it is important to note that all these solutions use tolist() function, called at different places. In some cases, we call it for the output of <em>dataframe[column_name]<\/em>, whereas in some cases we call it on output of <em>dataframe.values<\/em>. Depending on where you call tolist() function, its result differs and accordingly, you need to proceed.<\/p>\n\n\n\n<p>Also read:<\/p>\n\n\n\n<p><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-compare-two-lists-in-python\/\">How to Compare Two Lists in Python<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-create-dictionary-from-lists-in-python\/\">How to Create Dictionary from Lists<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-remove-duplicates-from-list-in-python\/\">How to Remove Duplicates from List<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes software developers need to convert Pandas dataframe to list in Python. Here are different ways to do this transformation.<\/p>\n","protected":false},"author":1,"featured_media":7640,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[301],"tags":[405],"class_list":["post-7625","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-dataframe-to-list"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Convert Pandas Dataframe to List - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes software developers need to convert Pandas dataframe to list in Python. Here are different ways to do this transformation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Convert Pandas Dataframe to List - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes software developers need to convert Pandas dataframe to list in Python. Here are different ways to do this transformation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-04T07:02:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-04T07:19:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/04\/convert-dataframe-into-list.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"241\" \/>\n\t<meta property=\"og:image:height\" content=\"161\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Convert Pandas Dataframe to List\",\"datePublished\":\"2025-04-04T07:02:36+00:00\",\"dateModified\":\"2025-04-04T07:19:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/\"},\"wordCount\":550,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1\",\"keywords\":[\"dataframe to list\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/\",\"name\":\"How to Convert Pandas Dataframe to List - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1\",\"datePublished\":\"2025-04-04T07:02:36+00:00\",\"dateModified\":\"2025-04-04T07:19:08+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes software developers need to convert Pandas dataframe to list in Python. Here are different ways to do this transformation.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1\",\"width\":241,\"height\":161,\"caption\":\"convert dataframe into list in python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-pandas-dataframe-to-list\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Convert Pandas Dataframe to List\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Convert Pandas Dataframe to List - Ubiq BI","description":"Sometimes software developers need to convert Pandas dataframe to list in Python. Here are different ways to do this transformation.","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:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/","og_locale":"en_US","og_type":"article","og_title":"How to Convert Pandas Dataframe to List - Ubiq BI","og_description":"Sometimes software developers need to convert Pandas dataframe to list in Python. Here are different ways to do this transformation.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2025-04-04T07:02:36+00:00","article_modified_time":"2025-04-04T07:19:08+00:00","og_image":[{"width":241,"height":161,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/04\/convert-dataframe-into-list.jpg","type":"image\/jpeg"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Convert Pandas Dataframe to List","datePublished":"2025-04-04T07:02:36+00:00","dateModified":"2025-04-04T07:19:08+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/"},"wordCount":550,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/04\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1","keywords":["dataframe to list"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/","name":"How to Convert Pandas Dataframe to List - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/04\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1","datePublished":"2025-04-04T07:02:36+00:00","dateModified":"2025-04-04T07:19:08+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes software developers need to convert Pandas dataframe to list in Python. Here are different ways to do this transformation.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/04\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/04\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1","width":241,"height":161,"caption":"convert dataframe into list in python"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-pandas-dataframe-to-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Convert Pandas Dataframe to List"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/04\/convert-dataframe-into-list.jpg?fit=241%2C161&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-1YZ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/7625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=7625"}],"version-history":[{"count":15,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/7625\/revisions"}],"predecessor-version":[{"id":7642,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/7625\/revisions\/7642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/7640"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=7625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=7625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=7625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}