title: Forecasting with repeated time series and without specific period of time (semesters)
body: <p>I have a dataset that has multiple time series and I want my predictions on each of the time series in that group. This is the DataFrame (head):</p>
  <pre><code>  Area_territoriale   Regione         Prov Fascia        Descr_Tipologia  \
  0        NORD-OVEST  Piemonte  Alessandria      B             Abitazioni   
  1        NORD-OVEST  Piemonte  Alessandria      B       Garage personali   
  2        NORD-OVEST  Piemonte  Alessandria      B       Garage personali   
  3        NORD-OVEST  Piemonte  Alessandria      B       Garage personali   
  4        NORD-OVEST  Piemonte  Alessandria      B  Magazzini industriali   
  
    Periodo   Avg_loc  Avg_compr  
  0  2016-1  0.035266   0.046429  
  1  2016-1  0.051208   0.068878  
  2  2016-1  0.031401   0.043367  
  3  2016-1  0.028019   0.035714  
  4  2016-1  0.050725   0.056122  
  </code></pre>
  <p>So what I want to predict is the value <strong>Avg_compr</strong> based on all other categorical features like <strong>Area_territoriale, Regione, Prov, Fascia, Descr_Tipologia</strong> and also <strong>Avg_loc</strong>.</p>
  <p>The time is <strong>Periodo</strong>: the first number indicates the year and the second indicates the semester: for instance: 2020-1 indicates the first semester of the 2020 and 2020-2 indicates the second semester.</p>
  <p>How do I organize the data to give it to a model such as an LSTM? A Python solution is particularly appreciated.</p>
  <p>Thanks in advance.</p>