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?
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'}.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With