Use header=None when the columns are not labeled in your csv file
df = pd.read_csv("pathToFile.csv", header=None)
Use header=None when the columns are not labeled in your xlsx file
df = pd.read_excel("pathToFile.xlsx", header=None)
df.head()
df.tail()
df.shape
df.columns
df['column_name'].value_counts()
df.describe()
df.isnull().sum()
df.info()
NOTE: import seaborn as sns
sns.heatmap(df.isnull())
axis=1 is for columns
df.drop(['column_1','column_2'],axis=1,inplace=True)
df['column_name']=df['column_name'].fillna(df['column_name'].mean())
df['column_name'] = pd.factorize(df['column_name'])[0]
unique = pd.factorize(df['column_name'])[1]
df.index
df.to_numpy()
df.sort_values(by='colName')
df.copy()
df.dropna()
df.fillna(value=10)
pd.isna(df)
df.mean()
df.mean(1)
pd.concat([df[:2],df[3:6]])
pd.merge(df1,df2,on='indexColName')
df.groupby('colName').sum()
df.subtract(df['col'],axis=0)
df.to_csv('filename.csv')
df.to_excel('filename.xlsx',sheet_name='Sheet1')