title: When three parameter variables indicate one cell value in the dataset, how could I pivot_Longer/wider in Python?
body: <p>I have a dataset showing the capacity (kg) of different fruit and vegetables as below. I am considering using python to discover patterns regarding category/land position/year/weather.</p>
  <p>My goals are just to discover some pattern stuff hidden behind this dataset. So basically any relationships between those variables. But I feel like that if I cannot convert the first three rows, I cannot mover on.
  They can be something as below (just to discover some pattern stuff):</p>
  <ol>
  <li>Trends over time in northland and southland</li>
  <li>The current representation of northland in each category</li>
  <li>The current representation of summer and winter northland fruit</li>
  </ol>
  <p><strong>I have no idea how to use 'pivot_longer' or 'pivot_wider' to tidy the data.</strong></p>
  <p>Because I realised <strong>one capacity (kg) number required 3 conditions to satisfy at the same time. For example cell (3C) indicates apple growth in the northland in summer in the year 2019 has a capacity 80kg.</strong></p>
  <p><strong>But if I cannot tidy the data, there are three rows that indicate three different parameters (year, land position, weather). And after the first three rows are followed by the numbers directly.  I cannot do any analysis to discover the pattern</strong></p>
  <p><strong>In other words, there are already two columns of parameters 'category' and 'Name'. How can I switch the first three rows into another three columns in the data?</strong></p>
  <p><a href="https://i.stack.imgur.com/hxvye.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hxvye.png" alt="enter image description here" /></a></p>