Giter VIP home page Giter VIP logo

orbeckst / recsql Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 1.0 325 KB

RecSQL is a hack that allows one to load table-like data records into an in-memory sqlite database for quick and dirty analysis via SQL. The SQLarray class has additional SQL functions such as sqrt or histogram defined. SQL tables can always be returned as numpy record arrays so that data can be easily handled in other packages such as numpy or plotted via matplotlib. Selections produce new SQLarray objects.

Home Page: http://recsql.readthedocs.org/

License: GNU General Public License v3.0

Python 100.00%

recsql's People

Contributors

davidmashburn avatar orbeckst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

peterhil

recsql's Issues

Relative import issue

I'm getting an import error in sqlarray.py when it tries to load sqlfunctions.

Changing the import statement to: "from . import sqlfunctions" solved the problem for me.

Would you add licensing information?

I haven't reviewed sources, but I'd like to know the usage licensing. Would you be willing to add licensing (MIT, LGPL, etc) to this package?

recarray importing raises 'InterfaceError: Error binding parameter 0 - probably unsupported type'

This a known issue, as documented for the SQLarray class. Eventually we would like to have a way to always (correctly) read in recarrays. Until that happens, the rest of this issue report explains the problem and suggests workarounds.

The error occurs because the recarray contained NumPy data types such as numpy.int64 that are not understood by sqlite. Either convert the data manually (by setting the numpy dtypes yourself on the recarray, or better: feed a simple list of tuples (“records”) to this class in the keyword argument records. Make sure that these tuples only contain standard Python types. Together with records you will also have to supply the names of the data columns in the keyword argument columns.

If you are reading from a file then it might be simpler to use recsql.sqlarray.SQLarray_fromfile().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.