Determine Period Index and Column for DataFrame in Pandas Last Updated : 11 Jun, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In Pandas to determine Period Index and Column for Data Frame, we will use the pandas.period_range() method. It is one of the general functions in Pandas that is used to return a fixed frequency PeriodIndex, with day (calendar) as the default frequency. Syntax: pandas.to_numeric(arg, errors=’raise’, downcast=None) Parameters:start : Left bound for generating periodsend : Right bound for generating periodsperiods : Number of periods to generatefreq : Frequency aliasname : Name of the resulting PeriodIndex Returns: PeriodIndex Example 1: Python3 import pandas as pd course = ["DBMS", "DSA", "OOPS", "System Design", "CN", ] # pass the period and starting index webinar_date = pd.period_range('2020-08-15', periods=5) # Determine Period Index and Column # for DataFrame df = pd.DataFrame(course, index=webinar_date, columns=['Course']) df Output: Example 2: Python3 import pandas as pd day = ["Sun", "Mon", "Tue", "Wed", "Thurs", "Fri", "Sat"] # pass the period and starting index daycode = pd.period_range('2020-08-15', periods=7) # Determine Period Index and Column for DataFrame df = pd.DataFrame(day, index=daycode, columns=['day']) df Output: Example 3: Python3 import pandas as pd Team = ["Ind", "Pak", "Aus"] # pass the period and starting index match_date = pd.period_range('2020-08-01', periods=3) # Determine Period Index and Column for DataFrame df = pd.DataFrame(Team, index=match_date, columns=['Team']) df Output: Comment More infoAdvertise with us Next Article How to Sort a Pandas DataFrame by Both Index and Column? V vipinyadav15799 Follow Improve Article Tags : Python Python-pandas Python pandas-general-functions Python Pandas-exercise Practice Tags : python Similar Reads How to Get Column Names in Pandas Dataframe While analyzing the real datasets which are often very huge in size, we might need to get the pandas column names in order to perform certain operations. The simplest way to get column names in Pandas is by using the .columns attribute of a DataFrame. Let's understand with a quick example:Pythonimpo 4 min read How to get column and row names in DataFrame? While analyzing the real datasets which are often very huge in size, we might need to get the rows or index names and columns names in order to perform certain operations. Note: For downloading the nba dataset used in the below examples Click Here Getting row names in Pandas dataframe First, let's 3 min read Split Pandas Dataframe by Column Index Pandas support two data structures for storing data the series (single column) and dataframe where values are stored in a 2D table (rows and columns).  To index  a  dataframe using the index we need to make use of dataframe.iloc() method which takes Syntax: pandas.DataFrame.iloc[] Parameters:Index 3 min read How to convert index in a column of the Pandas dataframe? Each row in a dataframe (i.e level=0) has an index value i.e value from 0 to n-1 index location and there are many ways to convert these index values into a column in a pandas dataframe. First, let's create a Pandas dataframe. Here, we will create a Pandas dataframe regarding student's marks in a pa 4 min read How to Sort a Pandas DataFrame by Both Index and Column? In this article, we will discuss how to sort a Pandas dataframe by both index and columns. Sort DataFrame based on IndexWe can sort a Pandas DataFrame based on Index and column using sort_index method. To sort the DataFrame based on the index we need to pass axis=0 as a parameter to sort_index metho 3 min read How to Convert Index to Column in Pandas Dataframe? Pandas is a powerful tool which is used for data analysis and is built on top of the python library. The Pandas library enables users to create and manipulate dataframes (Tables of data) and time series effectively and efficiently. These dataframes can be used for training and testing machine learni 2 min read Like