sfu-db / connector-x

Fastest library to load data from DB to DataFrames in Rust and Python
https://sfu-db.github.io/connector-x
MIT License
1.95k stars 154 forks source link

Parameter order in read_sql makes switching out Pandas difficult #394

Open Diego-Hernandez-Moodys opened 1 year ago

Diego-Hernandez-Moodys commented 1 year ago

Describe your feature request

I'd like the parameters to be in the same order as pandas.read_sql(query, connector) at best.

I currently can't simply replace pandas.read_sql with connectorx.read_sql due to the parameter order. You may close if parameter order in read_sql is different between the different libraries you aim to replace.

wangxiaoying commented 1 year ago

Hi @Diego-Hernandez-Moodys , thanks for the advice. We added a pandas aligned interface in this commit. You can replace pandas.read_sql as follow:

# from pandas import read_sql
from connectorx import read_sql_pandas as read_sql

read_sql(sql, con)