Orange Forum • View topic - Converting from pandas.DataFrame to Orange.data.Table

Converting from pandas.DataFrame to Orange.data.Table

A place to ask questions about methods in Orange and how they are used and other general support.

Converting from pandas.DataFrame to Orange.data.Table

Postby justsomeguy » Fri Feb 22, 2013 16:46

has anyone made a conversion function for this that they are willing to share?

quick and dirty way would be to do this, i suppose:

Code: Select all
def convert_dataframe_to_orange(df):
    df.to_csv('_temp_.csv',index_label='id')
    orange_table = Orange.data.Table('_temp_.csv')
    os.unlink('_temp_.csv')
    return orange_table


was wondering if there was perhaps a better way out there.

Return to Questions & Support