Python access to WRDS Data
Project description
WRDS-Py is a library for extracting data from WRDS data sources and getting it into Pandas. The library allows users to access data from WRDS and extract data using SQL statements. The data that is returned is read into a Pandas data frame.
Installation
Mac OS/Linux
$ python setup.py install
Windows
The WRDS-PY package requires Pandas and Psycopg2. Binaries of these can be found here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg
Once the two required packages are installed, you can run $ python setup.py install
For more information please consult the WRDS Support section at https://wrds-web.wharton.upenn.edu/wrds/support/.
Usage
>>> import wrds >>> db = wrds.Connection() Enter your credentials. Username: <your_username> Password: <your_password> >>> db.list_libraries() ['audit', 'bank', 'block', 'bvd', 'bvdtrial', 'cboe', ...] >>> db.list_tables(library='crsp') ['aco_amda', 'aco_imda', 'aco_indfnta', 'aco_indfntq', ...] >>> db.describe_table(library='crsp', table='stocknames') Approximately 58957 rows in crsp.stocknames. name nullable type 0 permno True DOUBLE PRECISION 1 permco True DOUBLE PRECISION 2 namedt True DATE ...
>>> stocknames = db.get_table(library='crsp', table='stocknames', obs=10) >>> stocknames.head() permno permco namedt nameenddt cusip ncusip ticker \ 0 10000.0 7952.0 1986-01-07 1987-06-11 68391610 68391610 OMFGA 1 10001.0 7953.0 1986-01-09 1993-11-21 36720410 39040610 GFGC 2 10001.0 7953.0 1993-11-22 2008-02-04 36720410 29274A10 EWST 3 10001.0 7953.0 2008-02-05 2009-08-03 36720410 29274A20 EWST 4 10001.0 7953.0 2009-08-04 2009-12-17 36720410 29269V10 EGAS ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file wrds-3.0.4.tar.gz
.
File metadata
- Download URL: wrds-3.0.4.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9565a9e3e51aeb06077d60c97273f15d4347d429a65ead2c0f643948d59000c5 |
|
MD5 | b76247d7c0d8b39caea6811b4f4f2a2b |
|
BLAKE2b-256 | 31da892019b42c1729702262d7fca3ef51b014b929207ae9c8c9a2d0bd7eca50 |
File details
Details for the file wrds-3.0.4-py3.7.egg
.
File metadata
- Download URL: wrds-3.0.4-py3.7.egg
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 857ab84d9765c7ef4d35a8e6aa09083614257bf708c72a82d897b0588a56943d |
|
MD5 | 82b7bfda871451f24ff6e18ccce3b9dc |
|
BLAKE2b-256 | 968f6c4e763dc5a4e6d5fda9e0913fa336baa1003ae88deb0840e61b2ad19c34 |
File details
Details for the file wrds-3.0.4-py3-none-any.whl
.
File metadata
- Download URL: wrds-3.0.4-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3667fe1108047c0ab15c1787376a2e281909fdfc2a6bb1e012a87fc6008664cf |
|
MD5 | 6da522be87211971f30353e8cd534880 |
|
BLAKE2b-256 | 711659dd5e6bee5156e6c678e62cd187cfe9df621b7308e84b2ef7468d71bf28 |