tools/perf/cli_tools/soundwave/pandas_sqlite.py
def DataFrame(column_types, index=None, rows=None):
  """Create a DataFrame with given column types as index.

  Unlike usual pandas DataFrame constructors, this allows to have explicitly
  typed column values, even when no rows of data are provided. And, when such
  data is available, values are explicitly casted, instead of letting pandas
  guess a type.

  Args:
    column_types: A sequence of (name, dtype) pairs to define the columns.
    index: An optional column name or sequence of column names to use as index
      of the frame.
    rows: An optional sequence of rows of data.
  """
  if rows:
    cols = list(zip(*rows))
    assert len(cols) == len(column_types)
    cols = (list(vs) for vs in cols)
  else:
    cols = (None for _ in column_types)
  df = pandas.DataFrame()
  for (column, dtype), values in zip(column_types, cols):
    df[column] = pandas.Series(values, dtype=dtype)
  if index is not None:
    index = [index] if isinstance(index, six.string_types) else list(index)
    df.set_index(index, inplace=True)
  return df
Create a DataFrame with given column types as index.

  Unlike usual pandas DataFrame constructors, this allows to have explicitly
  typed column values, even when no rows of data are provided. And, when such
  data is available, values are explicitly casted, instead of letting pandas
  guess a type.

  Args:
    column_types: A sequence of (name, dtype) pairs to define the columns.
    index: An optional column name or sequence of column names to use as index
      of the frame.
    rows: An optional sequence of rows of data.
  
Create a DataFrame with given column types as index.
Unlike usual pandas DataFrame constructors, this allows to have explicitly
typed column values, even when no rows of data are provided. And, when such
data is available, values are explicitly casted, instead of letting pandas
guess a type.
Create a DataFrame with given column types as index . Unlike usual pandas DataFrame constructors this allows to have explicitly typed column values even when no rows of data are provided . And when such data is available values are explicitly casted instead of letting pandas guess a type .
def DataFrame(column_types, index=None, rows=None):
  if rows:
    cols = list(zip(*rows))
    assert len(cols) == len(column_types)
    cols = (list(vs) for vs in cols)
  else:
    cols = (None for _ in column_types)
  df = pandas.DataFrame()
  for (column, dtype), values in zip(column_types, cols):
    df[column] = pandas.Series(values, dtype=dtype)
  if index is not None:
    index = [index] if isinstance(index, six.string_types) else list(index)
    df.set_index(index, inplace=True)
  return df
def DataFrame ( column_types , index = None , rows = None ) : if rows : cols = list ( zip ( * rows ) ) assert len ( cols ) == len ( column_types ) cols = ( list ( vs ) for vs in cols ) else : cols = ( None for _ in column_types ) df = pandas . DataFrame ( ) for ( column , dtype ) , values in zip ( column_types , cols ) : df [ column ] = pandas . Series ( values , dtype = dtype ) if index is not None : index = [ index ] if isinstance ( index , six . string_types ) else list ( index ) df . set_index ( index , inplace = True ) return df
Create a DataFrame with given column types as index.
Create a DataFrame with given column types as index .
"""Create a DataFrame with given column types as index.

  Unlike usual pandas DataFrame constructors, this allows to have explicitly
  typed column values, even when no rows of data are provided. And, when such
  data is available, values are explicitly casted, instead of letting pandas
  guess a type.

  Args:
    column_types: A sequence of (name, dtype) pairs to define the columns.
    index: An optional column name or sequence of column names to use as index
      of the frame.
    rows: An optional sequence of rows of data.
  """
column_types
A sequence of (name, dtype) pairs to define the columns.
A sequence of ( name dtype ) pairs to define the columns .
index
An optional column name or sequence of column names to use as index
of the frame.
An optional column name or sequence of column names to use as index of the frame .
rows
An optional sequence of rows of data.
An optional sequence of rows of data .