class_docstr: Calculates spread between bid/ask and also tick count.
  
      
class_docstr_tok: ["Calculates","spread","between","bid\/ask","and","also","tick","count","."]
code: def calculate_spreads(
      self, data_frame, asset, bid_field="bid", ask_field="ask"
  ):
      if isinstance(asset, str):
          asset = [asset]
  
      cols = [x + ".spread" for x in asset]
  
      data_frame_spreads = pandas.DataFrame(
          index=data_frame.index, columns=cols
      )
  
      for a in asset:
          data_frame_spreads[a + ".spread"] = (
              data_frame[a + "." + ask_field]
              - data_frame[a + "." + bid_field]
          )
  
      return data_frame_spreads
  
imports: import pandas
  from findatapy.util.loggermanager import LoggerManager
label_desc: Use image node_id 2 for calling the MarketLiquidity obj's underlying member method code with example usage: obj.calculate_spreads(data_frame, asset, bid_field, ask_field) and returns: data_frame_spreads