class_docstr: Writer for data to be read by SQLiteAdjustmentReader
  
  Parameters
  ----------
  conn_or_path : str or sqlite3.Connection
      A handle to the target sqlite database.
  equity_daily_bar_reader : SessionBarReader
      Daily bar reader to use for dividend writes.
  overwrite : bool, optional, default=False
      If True and conn_or_path is a string, remove any existing files at the
      given path before connecting.
  
  See Also
  --------
  zipline.data.adjustments.SQLiteAdjustmentReader
class_docstr_tok: ["Writer","for","data","to","be","read","by","SQLiteAdjustmentReader","Parameters","--","--","--","--","--","conn_or_path",":","str","or","sqlite3.Connection","A","handle","to","the","target","sqlite","database",".","equity_daily_bar_reader",":","SessionBarReader","Daily","bar","reader","to","use","for","dividend","writes",".","overwrite",":","bool",",","optional",",","default=False","If","True","and","conn_or_path","is","a","string",",","remove","any","existing","files","at","the","given","path","before","connecting",".","See","Also","--","--","--","--","zipline.data.adjustments.SQLiteAdjustmentReader"]
docstr: Writes data to a SQLite file to be read by SQLiteAdjustmentReader.
  
  Parameters
  ----------
  splits : pandas.DataFrame, optional
      Dataframe containing split data. The format of this dataframe is:
        effective_date : int
            The date, represented as seconds since Unix epoch, on which
            the adjustment should be applied.
        ratio : float
            A value to apply to all data earlier than the effective date.
            For open, high, low, and close those values are multiplied by
            the ratio. Volume is divided by this value.
        sid : int
            The asset id associated with this adjustment.
  mergers : pandas.DataFrame, optional
      DataFrame containing merger data. The format of this dataframe is:
        effective_date : int
            The date, represented as seconds since Unix epoch, on which
            the adjustment should be applied.
        ratio : float
            A value to apply to all data earlier than the effective date.
            For open, high, low, and close those values are multiplied by
            the ratio. Volume is unaffected.
        sid : int
            The asset id associated with this adjustment.
  dividends : pandas.DataFrame, optional
      DataFrame containing dividend data. The format of the dataframe is:
        sid : int
            The asset id associated with this adjustment.
        ex_date : datetime64
            The date on which an equity must be held to be eligible to
            receive payment.
        declared_date : datetime64
            The date on which the dividend is announced to the public.
        pay_date : datetime64
            The date on which the dividend is distributed.
        record_date : datetime64
            The date on which the stock ownership is checked to determine
            distribution of dividends.
        amount : float
            The cash amount paid for each share.
  
      Dividend ratios are calculated as:
      ``1.0 - (dividend_value / "close on day prior to ex_date")``
  stock_dividends : pandas.DataFrame, optional
      DataFrame containing stock dividend data. The format of the
      dataframe is:
        sid : int
            The asset id associated with this adjustment.
        ex_date : datetime64
            The date on which an equity must be held to be eligible to
            receive payment.
        declared_date : datetime64
            The date on which the dividend is announced to the public.
        pay_date : datetime64
            The date on which the dividend is distributed.
        record_date : datetime64
            The date on which the stock ownership is checked to determine
            distribution of dividends.
        payment_sid : int
            The asset id of the shares that should be paid instead of
            cash.
        ratio : float
            The ratio of currently held shares in the held sid that
            should be paid with new shares of the payment_sid.
  
  See Also
  --------
  zipline.data.adjustments.SQLiteAdjustmentReader
docstr_tok: ["Writes","data","to","a","SQLite","file","to","be","read","by","SQLiteAdjustmentReader",".","Parameters","--","--","--","--","--","splits",":","pandas.DataFrame",",","optional","Dataframe","containing","split","data",".","The","format","of","this","dataframe","is",":","effective_date",":","int","The","date",",","represented","as","seconds","since","Unix","epoch",",","on","which","the","adjustment","should","be","applied",".","ratio",":","float","A","value","to","apply","to","all","data","earlier","than","the","effective","date",".","For","open",",","high",",","low",",","and","close","those","values","are","multiplied","by","the","ratio",".","Volume","is","divided","by","this","value",".","sid",":","int","The","asset","id","associated","with","this","adjustment",".","mergers",":","pandas.DataFrame",",","optional","DataFrame","containing","merger","data",".","The","format","of","this","dataframe","is",":","effective_date",":","int","The","date",",","represented","as","seconds","since","Unix","epoch",",","on","which","the","adjustment","should","be","applied",".","ratio",":","float","A","value","to","apply","to","all","data","earlier","than","the","effective","date",".","For","open",",","high",",","low",",","and","close","those","values","are","multiplied","by","the","ratio",".","Volume","is","unaffected",".","sid",":","int","The","asset","id","associated","with","this","adjustment",".","dividends",":","pandas.DataFrame",",","optional","DataFrame","containing","dividend","data",".","The","format","of","the","dataframe","is",":","sid",":","int","The","asset","id","associated","with","this","adjustment",".","ex_date",":","datetime64","The","date","on","which","an","equity","must","be","held","to","be","eligible","to","receive","payment",".","declared_date",":","datetime64","The","date","on","which","the","dividend","is","announced","to","the","public",".","pay_date",":","datetime64","The","date","on","which","the","dividend","is","distributed",".","record_date",":","datetime64","The","date","on","which","the","stock","ownership","is","checked","to","determine","distribution","of","dividends",".","amount",":","float","The","cash","amount","paid","for","each","share",".","Dividend","ratios","are","calculated","as",":","``","1.0","-","(","dividend_value","\/","``","close","on","day","prior","to","ex_date","''",")","``","stock_dividends",":","pandas.DataFrame",",","optional","DataFrame","containing","stock","dividend","data",".","The","format","of","the","dataframe","is",":","sid",":","int","The","asset","id","associated","with","this","adjustment",".","ex_date",":","datetime64","The","date","on","which","an","equity","must","be","held","to","be","eligible","to","receive","payment",".","declared_date",":","datetime64","The","date","on","which","the","dividend","is","announced","to","the","public",".","pay_date",":","datetime64","The","date","on","which","the","dividend","is","distributed",".","record_date",":","datetime64","The","date","on","which","the","stock","ownership","is","checked","to","determine","distribution","of","dividends",".","payment_sid",":","int","The","asset","id","of","the","shares","that","should","be","paid","instead","of","cash",".","ratio",":","float","The","ratio","of","currently","held","shares","in","the","held","sid","that","should","be","paid","with","new","shares","of","the","payment_sid",".","See","Also","--","--","--","--","zipline.data.adjustments.SQLiteAdjustmentReader"]
code: def write(
      self,
      splits=None,
      mergers=None,
      dividends=None,
      stock_dividends=None,
  ):
      """
      Writes data to a SQLite file to be read by SQLiteAdjustmentReader.
  
      Parameters
      ----------
      splits : pandas.DataFrame, optional
          Dataframe containing split data. The format of this dataframe is:
            effective_date : int
                The date, represented as seconds since Unix epoch, on which
                the adjustment should be applied.
            ratio : float
                A value to apply to all data earlier than the effective date.
                For open, high, low, and close those values are multiplied by
                the ratio. Volume is divided by this value.
            sid : int
                The asset id associated with this adjustment.
      mergers : pandas.DataFrame, optional
          DataFrame containing merger data. The format of this dataframe is:
            effective_date : int
                The date, represented as seconds since Unix epoch, on which
                the adjustment should be applied.
            ratio : float
                A value to apply to all data earlier than the effective date.
                For open, high, low, and close those values are multiplied by
                the ratio. Volume is unaffected.
            sid : int
                The asset id associated with this adjustment.
      dividends : pandas.DataFrame, optional
          DataFrame containing dividend data. The format of the dataframe is:
            sid : int
                The asset id associated with this adjustment.
            ex_date : datetime64
                The date on which an equity must be held to be eligible to
                receive payment.
            declared_date : datetime64
                The date on which the dividend is announced to the public.
            pay_date : datetime64
                The date on which the dividend is distributed.
            record_date : datetime64
                The date on which the stock ownership is checked to determine
                distribution of dividends.
            amount : float
                The cash amount paid for each share.
  
          Dividend ratios are calculated as:
          ``1.0 - (dividend_value / "close on day prior to ex_date")``
      stock_dividends : pandas.DataFrame, optional
          DataFrame containing stock dividend data. The format of the
          dataframe is:
            sid : int
                The asset id associated with this adjustment.
            ex_date : datetime64
                The date on which an equity must be held to be eligible to
                receive payment.
            declared_date : datetime64
                The date on which the dividend is announced to the public.
            pay_date : datetime64
                The date on which the dividend is distributed.
            record_date : datetime64
                The date on which the stock ownership is checked to determine
                distribution of dividends.
            payment_sid : int
                The asset id of the shares that should be paid instead of
                cash.
            ratio : float
                The ratio of currently held shares in the held sid that
                should be paid with new shares of the payment_sid.
  
      See Also
      --------
      zipline.data.adjustments.SQLiteAdjustmentReader
      """
      self.write_frame("splits", splits)
      self.write_frame("mergers", mergers)
      self.write_dividend_data(dividends, stock_dividends)
      # Use IF NOT EXISTS here to allow multiple writes if desired.
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS splits_sids " "ON splits(sid)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS splits_effective_date "
          "ON splits(effective_date)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS mergers_sids " "ON mergers(sid)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS mergers_effective_date "
          "ON mergers(effective_date)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS dividends_sid "
          "ON dividends(sid)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS dividends_effective_date "
          "ON dividends(effective_date)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS dividend_payouts_sid "
          "ON dividend_payouts(sid)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS dividends_payouts_ex_date "
          "ON dividend_payouts(ex_date)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS stock_dividend_payouts_sid "
          "ON stock_dividend_payouts(sid)"
      )
      self.conn.execute(
          "CREATE INDEX IF NOT EXISTS stock_dividends_payouts_ex_date "
          "ON stock_dividend_payouts(ex_date)"
      )
  
imports: from collections import namedtuple
  from errno import ENOENT
  from os import remove
  from logbook import Logger
  import numpy
  from numpy import integer
  import pandas
  from pandas import Timestamp
  import six
  import sqlite3
  from zipline.utils.functional import keysorted
  from zipline.utils.input_validation import preprocess
  from zipline.utils.numpy_utils import datetime64ns_dtype, float64_dtype, int64_dtype, uint32_dtype, uint64_dtype
  from zipline.utils.pandas_utils import empty_dataframe
  from zipline.utils.sqlite_utils import group_into_chunks, coerce_string_to_conn
  from ._adjustments import load_adjustments_from_sqlite
label_desc: Use image node_id 13 for calling the SQLiteAdjustmentWriter obj's underlying member method code with example usage: obj.write(splits, mergers, dividends, stock_dividends) without return types