docstr: Merge a ctable bundle chunk into the main bundle for the exchange.
  
  Parameters
  ----------
  asset: TradingPair
  data_frequency: str
  period: str
  writer:
  empty_rows_behavior: str
      Ensure that the bundle does not have any missing data.
  
  cleanup: bool
      Remove the temp bundle directory after ingestion.
  
  Returns
  -------
  list[str]
      A list of problems which occurred during ingestion.
docstr_tok: ["Merge","a","ctable","bundle","chunk","into","the","main","bundle","for","the","exchange",".","Parameters","--","--","--","--","--","asset",":","TradingPair","data_frequency",":","str","period",":","str","writer",":","empty_rows_behavior",":","str","Ensure","that","the","bundle","does","not","have","any","missing","data",".","cleanup",":","bool","Remove","the","temp","bundle","directory","after","ingestion",".","Returns","--","--","--","-","list","[","str","]","A","list","of","problems","which","occurred","during","ingestion","."]
code: def ingest_ctable(
      self,
      asset,
      data_frequency,
      period,
      writer,
      empty_rows_behavior="strip",
      duplicates_threshold=100,
      cleanup=False,
  ):
      """
      Merge a ctable bundle chunk into the main bundle for the exchange.
  
      Parameters
      ----------
      asset: TradingPair
      data_frequency: str
      period: str
      writer:
      empty_rows_behavior: str
          Ensure that the bundle does not have any missing data.
  
      cleanup: bool
          Remove the temp bundle directory after ingestion.
  
      Returns
      -------
      list[str]
          A list of problems which occurred during ingestion.
  
      """
      problems = []
  
      # Download and extract the bundle
      path = get_bcolz_chunk(
          exchange_name=self.exchange_name,
          symbol=asset.symbol,
          data_frequency=data_frequency,
          period=period,
      )
  
      reader = self.get_reader(data_frequency, path=path)
      if reader is None:
          try:
              log.warn(
                  "the reader is unable to use bundle: {}, "
                  "deleting it.".format(path)
              )
              shutil.rmtree(path)
  
          except Exception as e:
              log.warn("unable to remove temp bundle: {}".format(e))
  
          raise TempBundleNotFoundError(path=path)
  
      start_dt = reader.first_trading_day
      end_dt = reader.last_available_dt
  
      if data_frequency == "daily":
          end_dt = end_dt - pd.Timedelta(hours=23, minutes=59)
  
      arrays = None
      try:
          arrays = reader.load_raw_arrays(
              sids=[asset.sid],
              fields=["open", "high", "low", "close", "volume"],
              start_dt=start_dt,
              end_dt=end_dt,
          )
      except Exception as e:
          log.warn(
              "skipping ctable for {} from {} to {}: {}".format(
                  asset.symbol, start_dt, end_dt, e
              )
          )
  
      if not arrays:
          return reader._rootdir
  
      periods = self.get_calendar_periods_range(
          start_dt, end_dt, data_frequency
      )
      df = get_df_from_arrays(arrays, periods)
      problems += self.ingest_df(
          ohlcv_df=df,
          data_frequency=data_frequency,
          asset=asset,
          writer=writer,
          empty_rows_behavior=empty_rows_behavior,
          duplicates_threshold=duplicates_threshold,
      )
  
      if cleanup:
          log.debug(
              "removing bundle folder following ingestion: {}".format(
                  reader._rootdir
              )
          )
          shutil.rmtree(reader._rootdir)
  
      return filter(partial(is_not, None), problems)
  
imports: import os
  import shutil
  from datetime import timedelta
  from functools import partial
  from itertools import chain
  from operator import is_not
  import numpy
  import pandas
  import pytz
  from catalyst import get_calendar
  from catalyst.assets._assets import TradingPair
  from catalyst.constants import DATE_TIME_FORMAT, AUTO_INGEST
  from catalyst.constants import LOG_LEVEL
  from catalyst.data.minute_bars import BcolzMinuteOverlappingData, BcolzMinuteBarMetadata
  from catalyst.exchange.exchange_bcolz import BcolzExchangeBarReader, BcolzExchangeBarWriter
  from catalyst.exchange.exchange_errors import EmptyValuesInBundleError, TempBundleNotFoundError, NoDataAvailableOnExchange, PricingDataNotLoadedError, DataCorruptionError, PricingDataValueError
  from catalyst.exchange.utils.bundle_utils import range_in_bundle, get_bcolz_chunk, get_df_from_arrays, get_assets
  from catalyst.exchange.utils.datetime_utils import get_start_dt, get_period_label, get_month_start_end, get_year_start_end
  from catalyst.exchange.utils.exchange_utils import get_exchange_folder, save_exchange_symbols, mixin_market_params, get_catalyst_symbol
  from catalyst.utils.cli import maybe_show_progress
  from catalyst.utils.paths import ensure_directory
  from logbook import Logger
  from pytz import UTC
  from six import itervalues
label_desc: Use image node_id 11 for calling the ExchangeBundle obj's underlying member method code with example usage: obj.ingest_ctable(asset, data_frequency, period, writer, empty_rows_behavior, duplicates_threshold, cleanup) and returns: filter, reader