3

I am using Matlab and its 'datasets', and R and its 'dataframes'.

I am thinking of using Python but I need an equivalent data-storing format. Extension 'Pandas' for Python has a class called dataframe which is similar.

Now I would like to be able to send a query to a SQL Server and store the result of that query in a Panda Dataframe

e.g.: newDataFrame = GetDataFrameFromSQLServer('SELECT * from schema.table',sqlConnection)

I had the impression that Pandas only talks to SQLite. Is that the case?

1 Answer 1

1

I believe pandas can handle any reading from any DB API v2.0 compliant data source. Have a look at pandas.io.sql(link) for a bunch of functions that facilitate this.

One thing to note, is that writing to a database requires a "flavor" where that flavor defaults to sqlite, but in the write_frame definition possible values are {'sqlite', 'mysql', 'oracle'}.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.