class_docstr: Does simple seasonality _calculations on data.
  
      
class_docstr_tok: ["Does","simple","seasonality","_calculations","on","data","."]
code: def bus_day_of_month_seasonality(
      self,
      data_frame,
      month_list=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
      cum=True,
      cal="FX",
      partition_by_month=True,
      add_average=False,
      price_index=False,
      resample_freq="B",
  ):
      calculations = Calculations()
      filter = Filter()
  
      if price_index:
          data_frame = data_frame.resample(
              resample_freq
          ).mean()  # resample into business days
          data_frame = calculations.calculate_returns(data_frame)
  
      data_frame.index = pandas.to_datetime(data_frame.index)
      data_frame = filter.filter_time_series_by_holidays(
          data_frame, cal
      )
  
      if resample_freq == "B":  # business days
          monthly_seasonality = (
              calculations.average_by_month_day_by_bus_day(
                  data_frame, cal
              )
          )
      elif resample_freq == "D":  # calendar days
          monthly_seasonality = (
              calculations.average_by_month_day_by_day(data_frame)
          )
  
      monthly_seasonality = monthly_seasonality.loc[month_list]
  
      if partition_by_month:
          monthly_seasonality = monthly_seasonality.unstack(level=0)
  
          if add_average:
              monthly_seasonality["Avg"] = monthly_seasonality.mean(
                  axis=1
              )
  
      if cum is True:
          if partition_by_month:
              monthly_seasonality.loc[0] = numpy.zeros(
                  len(monthly_seasonality.columns)
              )
              # monthly_seasonality.index = monthly_seasonality.index + 1       # shifting index
              monthly_seasonality = monthly_seasonality.sort_index()
  
          monthly_seasonality = calculations.create_mult_index(
              monthly_seasonality
          )
  
      return monthly_seasonality
  
file_path: finmarketpy/finmarketpy/economics/seasonality.py
imports: import numpy
  import pandas
  from findatapy.timeseries import Calculations, Filter
  from findatapy.util.commonman import CommonMan
  from findatapy.util.configmanager import ConfigManager
  from findatapy.util.loggermanager import LoggerManager
label_desc: Use image node_id 4 for calling the Seasonality obj's underlying member method code with example usage: obj.bus_day_of_month_seasonality(data_frame, month_list, cum, cal, partition_by_month, add_average, price_index, resample_freq) and returns: monthly_seasonality