maximkeremet

Untitled

Nov 25th, 2021
735
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---------------------------------------------------------------------------
  2. IndexError                                Traceback (most recent call last)
  3. /tmp/ipykernel_143/389704427.py in <module>
  4. ----> 1 _get_remaining_rto(raw_sales=raw_sales, mode='group')
  5.  
  6. /tmp/ipykernel_143/246326770.py in _get_remaining_rto(raw_sales, mode)
  7.     107
  8.     108         print(df_sales_in_bin)
  9. --> 109         df_sales_in_bin = df_sales_in_bin.withColumn('zero_bin_left', get_remaining_rto_estimate('bins_value'))
  10.     110
  11.     111         if mode == 'all':
  12.  
  13. /tmp/ipykernel_143/246326770.py in get_remaining_rto_estimate(binned_sales)
  14.      48     # Target value is predicted for the newest bin that contains the campaign period, so sales_in_bins_array[0] contains
  15.      49     # rto already spent in bins with campaign period
  16. ---> 50     spent_value = binned_sales_arr[0]
  17.      51     bins_number = arange(0, len(binned_sales_arr))
  18.      52
  19.  
  20. IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed
RAW Paste Data