This function pivots a dataset between long and wide formats based on the column count.
If the dataset has 5 or fewer columns, it is pivoted to a wide format, keeping
`prefecture`, `year`, `week` and `date` as fixed identifiers. If the dataset has more than 5 columns,
it is pivoted to a long format.