class_docstr: A derived class of `~greykite.algo.forecast.silverkite.SilverkiteForecast`.
  Provides an alternative interface with simplified configuration parameters.
  Produces the same trained model output and uses the same predict functions.
class_docstr_tok: ["A","derived","class","of","`","~greykite.algo.forecast.silverkite.SilverkiteForecast","`",".","Provides","an","alternative","interface","with","simplified","configuration","parameters",".","Produces","the","same","trained","model","output","and","uses","the","same","predict","functions","."]
docstr: Returns fourier series order from a `pandas.DataFrame`
  fourier series specification. Return value is capped by ``max_order``.
  
  Parameters
  ----------
  seasonality : `SilverkiteSeasonalityEnum.Seasonality` namedtuple
      Which seasonality to extract from ``fs``.
      Has attributes ``name``, ``period``, ``order``, ``seas_names``
      Can be a `SilverkiteSeasonalityEnum` member value.
  fs : `pandas.DataFrame` or None, optional, default `None`
      Columns: "name", "period", "order", "seas_names"
      Suitable for ``fs_components_df`` parameter for ``forecast_silverkite``
      for modeling seasonality.
      Could be returned by ``get_silverkite_seasonality``.
      Assumes that ``name`` and ``seas_names`` uniquely identify a row.
  max_order: `int` or None, optional, default `None`
      Upper limit on seasonality_order.
  
  Returns
  -------
  fs_order : `int`
      The Fourier series order of the row with the given `name` and `seas_names`
code: def __get_seasonality_order_from_dataframe(
      self, seasonality, fs=None, max_order=None
  ):
      """Returns fourier series order from a `pandas.DataFrame`
      fourier series specification. Return value is capped by ``max_order``.
  
      Parameters
      ----------
      seasonality : `SilverkiteSeasonalityEnum.Seasonality` namedtuple
          Which seasonality to extract from ``fs``.
          Has attributes ``name``, ``period``, ``order``, ``seas_names``
          Can be a `SilverkiteSeasonalityEnum` member value.
      fs : `pandas.DataFrame` or None, optional, default `None`
          Columns: "name", "period", "order", "seas_names"
          Suitable for ``fs_components_df`` parameter for ``forecast_silverkite``
          for modeling seasonality.
          Could be returned by ``get_silverkite_seasonality``.
          Assumes that ``name`` and ``seas_names`` uniquely identify a row.
      max_order: `int` or None, optional, default `None`
          Upper limit on seasonality_order.
  
      Returns
      -------
      fs_order : `int`
          The Fourier series order of the row with the given `name` and `seas_names`
      """
      order = 0
      if fs is not None:
          name_match = fs["name"] == seasonality.name
          seas_match = (
              (fs["seas_names"] == seasonality.seas_names)
              if seasonality.seas_names is not None
              else pd.isna(fs["seas_names"])
          )
  
          if any(name_match & seas_match):
              order = fs.loc[(name_match & seas_match), "order"].values[
                  0
              ]
      if max_order is not None:
          order = min(order, max_order)
      return order
  
imports: from datetime import datetime
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Type
  from typing import Union
  import pandas
  from greykite.algo.changepoint.adalasso.changepoint_detector import get_changepoints_dict
  from greykite.algo.forecast.silverkite.auto_config import get_auto_growth
  from greykite.algo.forecast.silverkite.auto_config import get_auto_holidays
  from greykite.algo.forecast.silverkite.auto_config import get_auto_seasonality
  from greykite.algo.forecast.silverkite.constants.silverkite_column import SilverkiteColumn
  from greykite.algo.forecast.silverkite.constants.silverkite_constant import SilverkiteConstant
  from greykite.algo.forecast.silverkite.constants.silverkite_constant import default_silverkite_constant
  from greykite.algo.forecast.silverkite.constants.silverkite_holiday import SilverkiteHoliday
  from greykite.algo.forecast.silverkite.constants.silverkite_time_frequency import SilverkiteTimeFrequencyEnum
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import cols_interact
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import generate_holiday_events
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import get_event_pred_cols
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import patsy_categorical_term
  from greykite.common import constants
  from greykite.common.constants import GrowthColEnum
  from greykite.common.enums import SimpleTimeFrequencyEnum
  from greykite.common.enums import TimeEnum
  from greykite.common.features.timeseries_features import get_available_holidays_across_countries
  from greykite.common.features.timeseries_features import get_changepoint_features_and_values_from_config
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import unique_elements_in_list
  from greykite.common.python_utils import update_dictionary
  from greykite.common.time_properties_forecast import get_forecast_time_properties
label_desc: Use image node_id 6 for calling the SimpleSilverkiteForecast obj's underlying member method code with example usage: obj.__get_seasonality_order_from_dataframe(seasonality, fs, max_order) and returns: order