Python code example for AIS data cleaning

I can give you some Python code samples for AIS data cleaning: 1. Remove undefined columns from Pandas object: import pandas as pd df = pd.DataFrame({'A': [1, 2, 3], 'B': [None, 4, 5]}) df.dropna(axis=1, how='all', inplace=True) 2. Remove duplicate rows from the data frame: import pandas as pd df = pd.DataFrame ({'A': [1, 2, 3], 'B': [4, 5, 5]}) df = df.drop_duplicates()

Guess you like

Origin blog.csdn.net/weixin_42605397/article/details/129548837