Name | wrds JSON |
Version |
3.2.0
JSON |
| download |
home_page | |
Summary | Access WRDS data through PostgreSQL in Python. |
upload_time | 2024-01-31 20:31:50 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | BSD-3-Clause |
keywords |
wrds
finance
research
crsp
compustat
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# WRDS-Py from Wharton Research Data Services
WRDS-Py is a Python package for examining datasets on the [Wharton Research Data Services (WRDS)](https://wrds-www.wharton.upenn.edu) platform, and extracting data to Pandas dataframes. A WRDS account is required.
## Installation
The WRDS-Py package requires Python 3.8 or newer. To ensure you have a supported Python version, type `python --version` at a command line interface, and check that it is greater than 3.8. On some systems, Python may be in installed as `python3`. You can [download Python here](https://www.python.org/downloads/) if it isn't installed.
The WRDS-Py package must be installed before it can be used for the first time. The recommended method is to use a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/) (`venv`), so you can `import` it to use in Python. This example will install the WRDS-Py package (`wrds`) and [IPython](https://ipython.org/), which provides a much nicer command line interface than is included with Python.
#### Linux or MacOS
```
$ python -m venv --copies --prompt wrds-py wrds-py
$ source wrds-py/bin/activate
(wrds-py) $ python -m pip install -U pip wheel wrds ipython
```
In this example, Python will create a `venv` in your current directory `./wrds-py`, so that when you want to use it again, you can simply activate it:
```
$ source wrds-py/bin/activate
```
#### Windows
```
C:\Users\username> python -m venv --copies --prompt wrds-py wrds-py
C:\Users\username> wrds-py\Scripts\activate
(wrds-py) C:\Users\username> python -m pip install -U pip wheel wrds ipython
```
In this example, Python will create a `venv` in the directory `C:\Users\username\wrds-py`, so that when you want to use it again, you can simply activate it:
```
C:\Users\username> wrds-py\Scripts\activate
```
For detailed information on installation of the module, please see [PYTHON: From Your Computer (Jupyter/Spyder)](https://wrds-www.wharton.upenn.edu/pages/support/programming-wrds/programming-python/python-from-your-computer/)
## Using the Py-WRDS Package
Type `ipython` to start the IPython command line interface.
For detailed information on use of the module, please see [Querying WRDS Data using Python](https://wrds-www.wharton.upenn.edu/pages/support/programming-wrds/programming-python/querying-wrds-data-python/)
A quick tutorial:
```
In [1]: import wrds
In [2]: db = wrds.Connection()
Enter your credentials.
Username: <your_username>
Password: <your_password>
In [3]: db.list_libraries()
['audit', 'bank', 'block', 'bvd', 'bvdtrial', 'cboe', ...]
In [4]: db.list_tables(library="crsp")
['aco_amda', 'aco_imda', 'aco_indfnta', 'aco_indfntq', ...]
In [5]: db.describe_table(library="crsp", table="stocknames")
Approximately 58957 rows in crsp.stocknames.
name nullable type
0 permno True DOUBLE PRECISION
1 namedt True DATE
2 nameenddt True DATE
...
In [6]: stocknames = db.get_table(library="crsp", table="stocknames", rows=10)
In [7]: 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
In [7]: db.close() # Close the connection to the database.
In [8]: with wrds.Connection() as db: # You can use a context manager
...: stocknames = db.get_table(library='crsp', table='stocknames', rows=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
```
Raw data
{
"_id": null,
"home_page": "",
"name": "wrds",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "wrds,finance,research,crsp,compustat",
"author": "",
"author_email": "Alex Malek <amalek@wharton.upenn.edu>, Tim Allen <tallen@wharton.upenn.edu>, Jeff VanSickle <vjef@wharton.upenn.edu>",
"download_url": "https://files.pythonhosted.org/packages/01/c2/7e01a543309deb62e6665d6000fd3ad43c98576edfc97ef7f40b950a6753/wrds-3.2.0.tar.gz",
"platform": null,
"description": "# WRDS-Py from Wharton Research Data Services\n\nWRDS-Py is a Python package for examining datasets on the [Wharton Research Data Services (WRDS)](https://wrds-www.wharton.upenn.edu) platform, and extracting data to Pandas dataframes. A WRDS account is required.\n\n## Installation\n\nThe WRDS-Py package requires Python 3.8 or newer. To ensure you have a supported Python version, type `python --version` at a command line interface, and check that it is greater than 3.8. On some systems, Python may be in installed as `python3`. You can [download Python here](https://www.python.org/downloads/) if it isn't installed.\n\nThe WRDS-Py package must be installed before it can be used for the first time. The recommended method is to use a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/) (`venv`), so you can `import` it to use in Python. This example will install the WRDS-Py package (`wrds`) and [IPython](https://ipython.org/), which provides a much nicer command line interface than is included with Python.\n\n#### Linux or MacOS\n\n```\n$ python -m venv --copies --prompt wrds-py wrds-py\n$ source wrds-py/bin/activate\n(wrds-py) $ python -m pip install -U pip wheel wrds ipython\n```\n\nIn this example, Python will create a `venv` in your current directory `./wrds-py`, so that when you want to use it again, you can simply activate it:\n\n```\n$ source wrds-py/bin/activate\n```\n\n#### Windows\n\n```\nC:\\Users\\username> python -m venv --copies --prompt wrds-py wrds-py\nC:\\Users\\username> wrds-py\\Scripts\\activate\n(wrds-py) C:\\Users\\username> python -m pip install -U pip wheel wrds ipython\n```\n\nIn this example, Python will create a `venv` in the directory `C:\\Users\\username\\wrds-py`, so that when you want to use it again, you can simply activate it:\n\n```\nC:\\Users\\username> wrds-py\\Scripts\\activate\n```\n\nFor detailed information on installation of the module, please see [PYTHON: From Your Computer (Jupyter/Spyder)](https://wrds-www.wharton.upenn.edu/pages/support/programming-wrds/programming-python/python-from-your-computer/)\n\n## Using the Py-WRDS Package\n\nType `ipython` to start the IPython command line interface.\n\nFor detailed information on use of the module, please see [Querying WRDS Data using Python](https://wrds-www.wharton.upenn.edu/pages/support/programming-wrds/programming-python/querying-wrds-data-python/)\n\nA quick tutorial:\n\n```\nIn [1]: import wrds\nIn [2]: db = wrds.Connection()\nEnter your credentials.\nUsername: <your_username>\nPassword: <your_password>\nIn [3]: db.list_libraries()\n['audit', 'bank', 'block', 'bvd', 'bvdtrial', 'cboe', ...]\nIn [4]: db.list_tables(library=\"crsp\")\n['aco_amda', 'aco_imda', 'aco_indfnta', 'aco_indfntq', ...]\nIn [5]: db.describe_table(library=\"crsp\", table=\"stocknames\")\nApproximately 58957 rows in crsp.stocknames.\n name nullable type\n0 permno True DOUBLE PRECISION\n1 namedt True DATE\n2 nameenddt True DATE\n...\n\nIn [6]: stocknames = db.get_table(library=\"crsp\", table=\"stocknames\", rows=10)\nIn [7]: stocknames.head()\n permno permco namedt nameenddt cusip ncusip ticker \\\n0 10000.0 7952.0 1986-01-07 1987-06-11 68391610 68391610 OMFGA\n1 10001.0 7953.0 1986-01-09 1993-11-21 36720410 39040610 GFGC\n2 10001.0 7953.0 1993-11-22 2008-02-04 36720410 29274A10 EWST\n3 10001.0 7953.0 2008-02-05 2009-08-03 36720410 29274A20 EWST\n4 10001.0 7953.0 2009-08-04 2009-12-17 36720410 29269V10 EGAS\n\nIn [7]: db.close() # Close the connection to the database.\n\nIn [8]: with wrds.Connection() as db: # You can use a context manager\n ...: stocknames = db.get_table(library='crsp', table='stocknames', rows=10)\n ...: stocknames.head()\n permno permco namedt nameenddt cusip ncusip ticker \\\n0 10000.0 7952.0 1986-01-07 1987-06-11 68391610 68391610 OMFGA\n1 10001.0 7953.0 1986-01-09 1993-11-21 36720410 39040610 GFGC\n2 10001.0 7953.0 1993-11-22 2008-02-04 36720410 29274A10 EWST\n3 10001.0 7953.0 2008-02-05 2009-08-03 36720410 29274A20 EWST\n4 10001.0 7953.0 2009-08-04 2009-12-17 36720410 29269V10 EGAS\n```\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Access WRDS data through PostgreSQL in Python.",
"version": "3.2.0",
"project_urls": {
"Documentation": "https://github.com/wharton/wrds/blob/master/README.md",
"Homepage": "http://wrds-www.wharton.upenn.edu",
"Repository": "https://github.com/wharton/wrds"
},
"split_keywords": [
"wrds",
"finance",
"research",
"crsp",
"compustat"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "478c3cce877628950ccb3a0a8d3c77ca6c28d2f5068c20ac3f0c1b44a1db3d7c",
"md5": "f527096b5d8af0456abad946248a4a6f",
"sha256": "8fad8cc1309ea1a66f421dd07e7f8186524f02dbafceeec8601b7eb7b785f173"
},
"downloads": -1,
"filename": "wrds-3.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f527096b5d8af0456abad946248a4a6f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 13160,
"upload_time": "2024-01-31T20:31:46",
"upload_time_iso_8601": "2024-01-31T20:31:46.564399Z",
"url": "https://files.pythonhosted.org/packages/47/8c/3cce877628950ccb3a0a8d3c77ca6c28d2f5068c20ac3f0c1b44a1db3d7c/wrds-3.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "01c27e01a543309deb62e6665d6000fd3ad43c98576edfc97ef7f40b950a6753",
"md5": "1d8c2e74d22b6c2b0251fd27f5b97c36",
"sha256": "dc6adc7a8628f827c344b5c2a3969b0b19f6ab5db8437d7b1f9861fe471017a6"
},
"downloads": -1,
"filename": "wrds-3.2.0.tar.gz",
"has_sig": false,
"md5_digest": "1d8c2e74d22b6c2b0251fd27f5b97c36",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 17826,
"upload_time": "2024-01-31T20:31:50",
"upload_time_iso_8601": "2024-01-31T20:31:50.629738Z",
"url": "https://files.pythonhosted.org/packages/01/c2/7e01a543309deb62e6665d6000fd3ad43c98576edfc97ef7f40b950a6753/wrds-3.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-31 20:31:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wharton",
"github_project": "wrds",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "wrds"
}