Select any row from a Dataframe in Pandas | Python Last Updated : 24 Oct, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will learn how to get the rows from a dataframe as a list, without using the functions like ilic[]. There are multiple ways to do get the rows as a list from given dataframe. Let’s see them will the help of examples. Python3 # importing pandas as pd import pandas as pd # Create the dataframe df = pd.DataFrame({'Date':['10/2/2011', '11/2/2011', '12/2/2011', '13/2/11'], 'Event':['Music', 'Poetry', 'Theatre', 'Comedy'], 'Cost':[10000, 5000, 15000, 2000]}) # using interrors() method # Create an empty list Row_list =[] # Iterate over each row for index, rows in df.iterrows(): # Create list for the current row my_list =[rows.Date, rows.Event, rows.Cost] # append the list to the final list Row_list.append(my_list) # Print the list print(Row_list) Output: [['10/2/2011', 'Music', 10000], ['11/2/2011', 'Poetry', 5000], ['12/2/2011', 'Theatre', 15000], ['13/2/11', 'Comedy', 2000]] Python3 # Print the first 2 elements print(Row_list[:2]) Output: [['10/2/2011', 'Music', 10000], ['11/2/2011', 'Poetry', 5000]] Comment More infoAdvertise with us Next Article Select any row from a Dataframe using iloc[] and iat[] in Pandas S Shivam_k Follow Improve Article Tags : Python Python-pandas pandas-dataframe-program Practice Tags : python Similar Reads Select any row from a Dataframe using iloc[] and iat[] in Pandas In this article, we will learn how to get the rows from a dataframe as a list, using the functions ilic[] and iat[]. There are multiple ways to do get the rows as a list from given dataframe. Letâs see them will the help of examples. Python import pandas as pd # Create the dataframe df = pd.DataFram 2 min read How to Select Rows from Pandas DataFrame? pandas.DataFrame.loc is a function used to select rows from Pandas DataFrame based on the condition provided. In this article, let's learn to select the rows from Pandas DataFrame based on some conditions. Syntax: df.loc[df['cname'] 'condition'] Parameters: df: represents data frame cname: represent 2 min read Create a list from rows in Pandas DataFrame | Set 2 In an earlier post, we had discussed some approaches to extract the rows of the dataframe as a Python's list. In this post, we will see some more methods to achieve that goal. Note : For link to the CSV file used in the code, click here. Solution #1: In order to access the data of each row of the Pa 2 min read Python | Pandas dataframe.select_dtypes() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.select_dtypes() function return a subset of the DataFrameâs columns b 2 min read How to Randomly Select rows from Pandas DataFrame In Pandas, it is possible to select rows randomly from a DataFrame with different methods. Randomly selecting rows can be useful for tasks like sampling, testing or data exploration.Creating Sample Pandas DataFrameFirst, we will create a sample Pandas DataFrame that we will use further in our articl 3 min read Randomly Select Columns from Pandas DataFrame In this article, we will discuss how to randomly select columns from the Pandas Dataframe. According to our requirement, we can randomly select columns from a pandas Database method where pandas df.sample() method helps us randomly select rows and columns. Syntax of pandas sample() method: Return a 3 min read Like