def to_feather(df, path):
 if (not isinstance(df, DataFrame)):
  raise ValueError('feather only support IO with DataFrames')
 feather = _try_import()
 valid_types = {'string', 'unicode'}
 if (not isinstance(df.index, Int64Index)):
  raise ValueError('feather does not serializing {} for the index; you can .reset_index()to make the index into column(s)'.format(type(df.index)))
 if (not df.index.equals(RangeIndex.from_range(range(len(df))))):
  raise ValueError('feather does not serializing a non-default index for the index; you can .reset_index()to make the index into column(s)')
 if (df.index.name is not None):
  raise ValueError('feather does not serialize index meta-data on a default index')
 if (df.columns.inferred_type not in valid_types):
  raise ValueError('feather must have string column names')
 feather.write_dataframe(df, path)

def to_feather ( df , path ) : if ( not isinstance ( df , DataFrame ) ) : raise ValueError ( 'feather only support IO with DataFrames' ) feather = _try_import ( ) valid_types = { 'string' , 'unicode' } if ( not isinstance ( df . index , Int64Index ) ) : raise ValueError ( 'feather does not serializing {} for the index; you can .reset_index()to make the index into column(s)' . format ( type ( df . index ) ) ) if ( not df . index . equals ( RangeIndex . from_range ( range ( len ( df ) ) ) ) ) : raise ValueError ( 'feather does not serializing a non-default index for the index; you can .reset_index()to make the index into column(s)' ) if ( df . index . name is not None ) : raise ValueError ( 'feather does not serialize index meta-data on a default index' ) if ( df . columns . inferred_type not in valid_types ) : raise ValueError ( 'feather must have string column names' ) feather . write_dataframe ( df , path )
write a dataframe to the feather-format parameters df : dataframe path : string file path .