hannes / MonetDBLite

MonetDB reconfigured as a library
108 stars 11 forks source link

Cannot create tables from pandas dataframes #173

Closed kutsurak closed 5 years ago

kutsurak commented 7 years ago

Hello guys,

I encountered the following bugs in the python version of MonetDB Lite (I installed with pip install):

  1. In Python 3 creating a table from a Pandas dataframe doesn't work at all, because all columns in the data frame are of type object so an exception is raised at create.

  2. In Python 2 Unicode characters in a CSV raise the exception: DatabaseError: pyapi.eval:Invalid string encoding used. Please return a regular ASCII string, or a Numpy_Unicode object.

I am attaching a small testcase for both, just comment/uncomment the correct line in the load.py

Library versions:

python2 2.7.13 python3 3.5.3 monetdblite 0.1.9 numpy 1.13.1 pandas 0.20.3

cc @Mytherin

mdblite_python_bugreport.tar.gz

Panos.

PS: another thing, although it's not exactly a bug is that pip install monetdblite fails if numpy is not installed. Maybe consider adding it as a dependency? (although I do remember the discussion we had with @hannesmuehleisen a few days ago :) )

hannes commented 6 years ago

I have added it as a dependency

hannes commented 6 years ago

@kutsurak could you have a look again what is going wrong here?