Clean and return dataframe
Loads dataframe, removes Nan rows, strips whitespaces, converts columns to lowercase and returns a clean dataframe
Arguments
- data
: A raw dataframe
Value
data : clean dataframe
Examples
data= tidyr::tibble(num_legs= c(2, 4, 8, 0), num_wings= c('bad', 'Good', NA, 'bad'),Num_specimen = c(10, 2, 1, 8))
clean_data(data)
#> # A tibble: 3 × 3
#> num_legs num_wings num_specimen
#> <dbl> <chr> <dbl>
#> 1 2 bad 10
#> 2 4 Good 2
#> 3 0 bad 8