Skip to content

Unofficial Python driver library for the RethinkDB database server with Pandas

License

Notifications You must be signed in to change notification settings

somehitDev/rethinkdb_pandas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rethinkdb-pandas

RethinkDB Python Driver with Pandas




🛠️ Install

  • from pip
pip install rethinkdb-pandas
  • from git
pip install git+https://github.com/somehitDev/rethinkdb-pandas.git

📄 Usage

  • import same as rethinkdb python driver
from rethinkdb_pandas import r
  • connect to server same as rethink python driver
r.connect("{host}", {port}, **kwargs)
  • use same as rethinkdb python driver
    • but, sql result return as pd.DataFrame
    • and pass pd.DataFrame into insert function
r.table("posts").insert(
    pd.read_json("https://jsonplaceholder.typicode.com/posts")
).run(con)
df_posts = r.table("posts").run(con)
print(df_posts.head())
""" print like below
   userId  id                                              title                                               body
0       1   1  sunt aut facere repellat provident occaecati e...  quia et suscipit\nsuscipit recusandae consequu...
1       1   2                                       qui est esse  est rerum tempore vitae\nsequi sint nihil repr...
2       1   3  ea molestias quasi exercitationem repellat qui...  et iusto sed quo iure\nvoluptatem occaecati om...
3       1   4                               eum et est occaecati  ullam et saepe reiciendis voluptatem adipisci\...
4       1   5                                 nesciunt quas odio  repudiandae veniam quaerat sunt sed\nalias aut...
"""



⚠️ for detail information, see rethinkdb python driver

About

Unofficial Python driver library for the RethinkDB database server with Pandas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages