drop ( df . pandas.Series.drop¶ Series.drop (self, labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise') [source] ¶ Return Series with specified index labels removed. You can find out name of first column by using this command df.columns[0]. Output : As we can see in the output, the Series.drop() function has successfully dropped the entries corresponding to the passed index labels. See the User Guide for more on which values are considered missing, and how to work with missing data.. Parameters axis {0 or ‘index’}, default 0. Determine if rows or columns which contain missing values are removed. pandas.DataFrame.dropna¶ DataFrame.dropna (self, axis=0, how='any', thresh=None, subset=None, inplace=False) [source] ¶ Remove missing values. See the User Guide for more on which values are considered missing, and how to work with missing data.. Parameters axis {0 or ‘index’, 1 or ‘columns’}, default 0. python进行数据处理——pandas的drop函数 112833; 2017阿里巴巴内推面经—测试开发岗 9472; Linux基础——linux和gcc的介绍 5183; Linux基础——32位和64位系统的区别? inplace bool, default False. Drop a row by row number (in this case, row 3) Note that Pandas uses zero based numbering, so 0 is the first row, 1 is the second row, etc. Remove elements of a Series based on specifying the index labels. Indexing in python starts from 0. df.drop(df.columns[0], axis =1) To drop multiple columns by position (first and third columns), you can specify the position in list [0,2]. When using a multi-index, labels on different levels can be removed by specifying the level. df . There is only one axis to drop values from. pandas.Series.dropna¶ Series.dropna (self, axis=0, inplace=False, how=None) [source] ¶ Return a new Series with missing values removed. Remove rows or columns by specifying label names and corresponding axis, or … pandas.DataFrameの行・列を指定して削除するにはdrop()メソッドを使う。バージョン0.21.0より前は引数labelsとaxisで行・列を指定する。0.21.0以降は引数indexまたはcolumnsが使えるようになった。pandas.DataFrame.drop — pandas 0.21.1 documentation ここでは以下の内容について説明する。 index [ 2 ]) Example #2 : Use Series.drop() function to drop the values corresponding to the passed index labels in the given series object. pandas.DataFrame.drop¶ DataFrame.drop (self, labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise') [source] ¶ Drop specified labels from rows or columns. How to drop column by position number from pandas Dataframe?