GitXplorerGitXplorer
m

dfsql

public
51 stars
9 forks
3 issues

Commits

List of commits on branch stable.
Verified
2c98482d9426ef05edc5d03d750cc855d94e6ebf

Merge pull request #46 from mindsdb/fix-45

SStpMax committed 3 years ago
Unverified
1f70af68f5d7ece965b2fb113e2ce0c5a414c4ea

bump version

SStpMax committed 3 years ago
Unverified
96df858acac395ee488c050891330ae96a0f80eb

fix for frequency queries

SStpMax committed 3 years ago
Verified
4c5bfc3f960207a82c3e0aede46c0e93e399c5d6

Remove outdated base string for python 3.8 support (#39)

bbtseytlin committed 3 years ago
Verified
62dcd1b4932a1f275795511928bccbbabd340b38

Add ability to disable reducing query results, add ability to enable case insensitive mode (#36)

bbtseytlin committed 3 years ago
Verified
27269b503850170572cc2ae9b63a4b1e6bc8d13d

Version bump (#35)

bbtseytlin committed 3 years ago

README

The README file for this repository.

dfsql - SQL interface to Pandas.

Installation

pip install dfsql

Example

>>> import pandas as pd
>>> from dfsql import sql_query

>>> df = pd.DataFrame({
...     "animal": ["cat", "dog", "cat", "dog"],
...     "height": [23,  100, 25, 71] 
... })
>>> df.head()
  animal  height
0    cat      23
1    dog     100
2    cat      25
3    dog      71
>>> sql_query("SELECT animal, height FROM animals_df WHERE height > 50", animals_df=df)
  animal  height
0    dog     100
1    dog      71

Quickstart/Tutorial

Head over to the testdrive notebook to see all available features.

Configuring Modin usage

dfsql supports executing queries using Modin for enchanced performance.

By default Modin will be used if it's installed.

To override this behavior and use Pandas set the USE_MODIN environment variable to False or 0 before importing dfsql:

(venv) user:~/mindsdb/dfsql$ export USE_MODIN=0
(venv) user:~/mindsdb/dfsql$ python
Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dfsql
>>> dfsql.config.Configuration.as_dict()
{'USE_MODIN': 0}