Horje
pandas drop empty columns Code Example
pandas drop empty columns
DataFrameName.dropna(axis=1, how='all', inplace=True)
remove rows or columns with NaN value
df.dropna()     #drop all rows that have any NaN values
df.dropna(how='all')
Returns a new DataFrame omitting rows with null values
# Returns a new DataFrame omitting rows with null values

df4.na.drop().show()
# +---+------+-----+
# |age|height| name|
# +---+------+-----+
# | 10|    80|Alice|
# +---+------+-----+




Python

Related
drop if nan in column pandas Code Example drop if nan in column pandas Code Example
pd.options.display.max_columns()pd.options.display.max_row() Code Example pd.options.display.max_columns()pd.options.display.max_row() Code Example
python count the frequency of words in a list Code Example python count the frequency of words in a list Code Example
python get user home directory Code Example python get user home directory Code Example
traceback python Code Example traceback python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7