ax = sns.barplot(x="lovely_brand", y="user_id", data=brands_loyalty) barplot
df[
~(df['workingday'] == 0)
&(df['temp'] >= 10)
&(df['temp'] < 30)
] with working filtering
~(df['workingday'] == 0)
&(df['temp'] >= 10)
&(df['temp'] < 30)
] with working filtering
pd.set_option('display.max_rows', 85, index_col ="Column") for showing out the all indexes in table
df.sort_values(by=['Country', 'ConvertedCp,'], ascending=[True, False], inplace = True) sorting advanced
country_grp['Salary'].median().loc['Germany'] Germany country looking for the Salary
country_uses_python = country_grp['LanguageWorkedWith'].apply(lambda x: x.str.contains('Python').sum())
where Python word contains
where Python word contains
df.apply(len, axis='columns')
df['email'].apply(len)
len(df['email'])
df['email'].apply(len)
len(df['email'])
df['full_name'] = df['first'] + '' + df['last']
adding columsn
adding columsn
df.drop(columns = ['first', ' last'], inplace = True)
removing column
removing column
df[['first', 'last']] = df['full_name'].str.split(' ', expand = True)
mergin two columns as one
mergin two columns as one
df.dropna(axis ='index', how ='all', subset=['last', 'email'])
droping null values with specfiying indexes
droping null values with specfiying indexes
df['age'] = df['age'].astype(float)
working with missing values
working with missing values
Forwarded from Khafizullo
and I used my date column to united to seconds because what it was needed then decided to use what columns need i