loc and iloc
Also: selection, indexing
Python tools
Two ways to select rows and columns: loc by label or condition, iloc by position.
Exampledf.loc[df['tenure'] == 0, ['customerID', 'TotalCharges']] selects brand-new customers and two columns.
Also: selection, indexing
Two ways to select rows and columns: loc by label or condition, iloc by position.
Exampledf.loc[df['tenure'] == 0, ['customerID', 'TotalCharges']] selects brand-new customers and two columns.