Python | Pandas dataframe.get() Last Updated : 19 Nov, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report 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.get() function is used to get item from object for given key. The key could be one or more than one dataframe column. It returns default value if not found. Syntax: DataFrame.get(key, default=None) Parameters : key : object Returns : value : type of items contained in object For link to CSV file Used in Code, click here Example #1: Use get() function to extract a column out of the dataframe Python3 # importing pandas as pd import pandas as pd # Creating the dataframe df = pd.read_csv("nba.csv") # Print the dataframe df Output : Now apply the get() function. We are going to extract the "Salary" column from the dataframe. Python3 1== # applying get() function df.get("Salary") Output : Notice, the output is not a dataframe but a pandas series object. Example #2: Use get() function to extract multiple columns at a time in random order Python3 # importing pandas as pd import pandas as pd # Creating the dataframe df = pd.read_csv("nba.csv") df.get(["Salary", "Team", "Name"]) Output : A dataframe is returned as output. The ordering of the columns is not according to the actual dataframe but it follows the ordering that we provided to it in the function input. Comment More infoAdvertise with us Next Article Python | Pandas dataframe.get() S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python-pandas Python pandas-dataFrame Pandas-DataFrame-Methods +1 More Practice Tags : python Similar Reads Python | Pandas Dataframe.iat[ ] 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 iat[] method is used to return data in a dataframe at the passed location. The 2 min read Python | Pandas dataframe.insert() DataFrame.insert() function in pandas inserts a new column into a DataFrame at a specified position. It allows you to specify the column index, column label and values to insert. This is particularly useful when you want to place a new column in a specific position instead of just appending it at th 4 min read Python | Pandas Dataframe.at[ ] 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 at[] is used to return data in a dataframe at the passed location. The passed l 2 min read Python | Pandas dataframe.info() When working with data in Python understanding the structure and content of our dataset is important. The dataframe.info() method in Pandas helps us in providing a concise summary of our DataFrame and it quickly assesses its structure, identify issues like missing values and optimize memory usage.Ke 2 min read Python | Pandas DataFrame.values Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure o 2 min read Like