{"id":5613,"date":"2023-10-27T09:30:25","date_gmt":"2023-10-27T04:00:25","guid":{"rendered":"https:\/\/python-programs.com\/?p=5613"},"modified":"2023-11-10T12:02:44","modified_gmt":"2023-11-10T06:32:44","slug":"drop-first-row-of-pandas-dataframe-3-ways","status":"publish","type":"post","link":"https:\/\/python-programs.com\/drop-first-row-of-pandas-dataframe-3-ways\/","title":{"rendered":"Drop first row of pandas dataframe (3 Ways)"},"content":{"rendered":"

How to delete first row of pandas dataframe in Python ?<\/h2>\n

In this article we will discuss about different ways to delete first row of pandas dataframe in Python.<\/p>\n

Method-1 : By using iloc attribute :<\/h3>\n

An iloc<\/code> attribute is there in Pandas by using which we can select a portion of the dataframe that may be few columns or rows which is simply called as position based indexing.<\/p>\n

Syntax - df.<\/span>iloc<\/span>[start_row<\/span>:end_row , start_column, end_column<\/span>]<\/span><\/pre>\n

Where,<\/p>\n