Import data

Apply the following dplyr verbs to your data

Filter rows

## # A tibble: 10 × 12
##    Brand Model  Year Kilometers_Driven Fuel_Type Transmission Owner_Type Mileage
##    <chr> <chr> <dbl>             <dbl> <chr>     <chr>        <chr>        <dbl>
##  1 Toyo… Coro…  2018             50000 Petrol    Manual       First           15
##  2 Toyo… Inno…  2018             50000 Diesel    Manual       First           13
##  3 Toyo… Fort…  2018             38000 Diesel    Automatic    Second          12
##  4 Toyo… Yaris  2020             18000 Petrol    Manual       First           17
##  5 Toyo… Camry  2016             38000 Petrol    Automatic    Second          19
##  6 Toyo… Inno…  2017             38000 Diesel    Manual       Second          13
##  7 Toyo… Fort…  2018             38000 Diesel    Automatic    Second          12
##  8 Toyo… Yaris  2020             18000 Petrol    Manual       First           17
##  9 Toyo… Camry  2016             38000 Petrol    Automatic    Second          19
## 10 Toyo… Inno…  2017             38000 Diesel    Manual       Second          13
## # ℹ 4 more variables: Engine <dbl>, Power <dbl>, Seats <dbl>, Price <dbl>

Arrange rows

## # A tibble: 100 × 12
##    Brand Model  Year Kilometers_Driven Fuel_Type Transmission Owner_Type Mileage
##    <chr> <chr> <dbl>             <dbl> <chr>     <chr>        <chr>        <dbl>
##  1 Mahi… Thar   2021             10000 Diesel    Manual       First           15
##  2 Mahi… Thar   2021             10000 Diesel    Manual       First           15
##  3 Ford  Figo   2020             15000 Petrol    Manual       Third           18
##  4 Volk… Ameo   2020             15000 Petrol    Automatic    Third           19
##  5 Maru… S-Cr…  2020             15000 Petrol    Automatic    Second          18
##  6 BMW   3 Se…  2020             15000 Petrol    Automatic    Second          15
##  7 Volk… Ameo   2020             15000 Petrol    Automatic    Third           19
##  8 Maru… S-Cr…  2020             15000 Petrol    Automatic    Second          18
##  9 BMW   3 Se…  2020             15000 Petrol    Automatic    Second          15
## 10 Maru… Erti…  2020             18000 Petrol    Manual       First           19
## # ℹ 90 more rows
## # ℹ 4 more variables: Engine <dbl>, Power <dbl>, Seats <dbl>, Price <dbl>

Select columns

## # A tibble: 100 × 3
##    Brand      Model    Year
##    <chr>      <chr>   <dbl>
##  1 Toyota     Corolla  2018
##  2 Honda      Civic    2019
##  3 Ford       Mustang  2017
##  4 Maruti     Swift    2020
##  5 Hyundai    Sonata   2016
##  6 Tata       Nexon    2019
##  7 Mahindra   Scorpio  2018
##  8 Volkswagen Polo     2020
##  9 Audi       A4       2017
## 10 BMW        X1       2019
## # ℹ 90 more rows

Add columns

## # A tibble: 100 × 13
##    Brand Model  Year Kilometers_Driven Fuel_Type Transmission Owner_Type Mileage
##    <chr> <chr> <dbl>             <dbl> <chr>     <chr>        <chr>        <dbl>
##  1 Toyo… Coro…  2018             50000 Petrol    Manual       First           15
##  2 Honda Civic  2019             40000 Petrol    Automatic    Second          17
##  3 Ford  Must…  2017             20000 Petrol    Automatic    First           10
##  4 Maru… Swift  2020             30000 Diesel    Manual       Third           23
##  5 Hyun… Sona…  2016             60000 Diesel    Automatic    Second          18
##  6 Tata  Nexon  2019             35000 Petrol    Manual       First           17
##  7 Mahi… Scor…  2018             45000 Diesel    Automatic    Second          15
##  8 Volk… Polo   2020             25000 Petrol    Automatic    First           18
##  9 Audi  A4     2017             30000 Diesel    Automatic    First           18
## 10 BMW   X1     2019             20000 Diesel    Automatic    Second          20
## # ℹ 90 more rows
## # ℹ 5 more variables: Engine <dbl>, Power <dbl>, Seats <dbl>, Price <dbl>,
## #   Impact_on_price <dbl>

Summarize by groups

## `summarise()` has grouped output by 'Brand', 'Transmission', 'Year'. You can
## override using the `.groups` argument.
## # A tibble: 60 × 4
## # Groups:   Brand, Transmission, Year [43]
##    Brand Transmission  Year   Price
##    <chr> <chr>        <dbl>   <dbl>
##  1 Audi  Automatic     2016 1900000
##  2 Audi  Automatic     2017 2000000
##  3 Audi  Automatic     2017 2200000
##  4 Audi  Automatic     2017 3000000
##  5 Audi  Automatic     2018 2600000
##  6 Audi  Automatic     2018 3200000
##  7 BMW   Automatic     2018 3200000
##  8 BMW   Automatic     2019 2700000
##  9 BMW   Automatic     2019 2800000
## 10 BMW   Automatic     2019 3000000
## # ℹ 50 more rows