Giter Club home page Giter Club logo

pandas_data's Introduction

pandas_data

Python Package used to deal with pandas and databases like MySQL and MongoDB

Installation

pip install git+https://github.com/rcourivaud/PandasData.git

Pandas MongoDB

Pandas link to MongoDB databases and collections..

Import package

from pandas_data.pandas_mongodb import PandasMongoDB

pmdb = PandasMongoDB()

Read dataframe from collection

df = pmdb.get_dataframe_from_collection(dbs,collection,query_dict)

Insert dataframe into collection

pmdb.insert_dataframe_into_collection(dbs, collection, df)

Pandas MySQL

Different function to deal with MySQL format, tables and procedures and Pandas Dataframes structure.

Import package

from pandas_data.pandas_mysql import PandasMySQL

pms = PandasMySQL(host, port, usr, pwd)

Import SQL Table into dataframe

df = pms.read_table("database_name", "table_name")

Upload dataframe to SQL database

pms.to_database("database_name", "table_name", df)

pandas_textmining

Handling Text Mining with pandas and sklearn

TFIDF

from pandas_textmining.tfidf_transformer import TfidfHelper

df = pd.DataFrame({'A': [1,2,3,4],
                    'C': pd.Series(1, index=list(range(4)), dtype='float32'),
                    'E': ["tester train train, train tester test",
                                         "train train trainer train", "test test test",
                                         "train train"],
                    'F': 'foo'})
tf = TfidfHelper()

print(tf.add_tfidf_on_dataframe(df, column_desciption="E", suffix="tf_"))

pandas_data's People

Contributors

rcourivaud avatar

Watchers

 avatar  avatar

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.