ESP - Mnaipulating data and visualising

Subdecks (1)

Cards (9)

  • To make a series using a column what should be done?
    Assume the following:
    A dataset named 'lungs' already exists
    A column named 'both' already exists
    Your answer is surrounded by a print command
    lungs.loc[:,'both']
  • To make a *dataset* using a column what should be done?
    Assume the following:
    A dataset named 'lungs' already exists
    A column named 'both' already exists
    Your answer is surrounded by a print command?
    lungs.loc[:,['both']]
  • What is the purpose of the loc command?
    To get or set the value/s of specified elements based on label
  • What is the purpose of the iloc command?
    Selects dataframe item, at specified index
  • .iterrows() allows you to iterate other rows of a dataframe
  • apply({function}) allows you to apply a change using a function to an entire column, useful for creating new column based off previous ones