From 605e581bf819bf233c7dbea4bca647be65115697 Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Wed, 31 Jan 2024 09:49:19 -0500 Subject: [PATCH 1/6] Tighten up the language a bit. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 61f46fa..588b9f5 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ WRDS-Py is a Python package for examining datasets on the [Wharton Research Data ## Installation -Before installing the WRDS-Py package, make sure you have a supported version of Python. At a command line interface, type `python --version`, and make sure it is 3.8 or higher. +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. -The WRDS-Py package must be installed before it can be used for the first time. The best way to do this is to use a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/), or `venv`, so you can `import` it to use in Python. In this example, we will show the a Linux prompt (`$`), This example will also [install IPython](https://ipython.org/), which provides a nice command-line interface. +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 From b15b7008084798dcc019bccfaf6e60d31a052da3 Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Wed, 31 Jan 2024 09:50:14 -0500 Subject: [PATCH 2/6] Change title. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 588b9f5..3a6a209 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# WRDS Python Data Access Library +# 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 it to Pandas dataframes. A WRDS account is required. From c2fb3e3d34138893d116522a2881d38e59c69f1f Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Wed, 31 Jan 2024 10:06:52 -0500 Subject: [PATCH 3/6] Update Installation text. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a6a209..4afa4e4 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # 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 it to Pandas dataframes. A WRDS account is required. +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. +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. From 59a8b57160a03f923326d352ef161ef81b927747 Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Wed, 31 Jan 2024 10:20:40 -0500 Subject: [PATCH 4/6] Clean up tutorial. --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4afa4e4..b23c9a9 100644 --- a/README.md +++ b/README.md @@ -47,25 +47,25 @@ For detailed information on use of the module, please see [Querying WRDS Data us A quick tutorial: ``` ->>> import wrds ->>> db = wrds.Connection() +In [1]: import wrds +In [2]: db = wrds.Connection() Enter your credentials. Username: Password: ->>> db.list_libraries() +In [3]: db.list_libraries() ['audit', 'bank', 'block', 'bvd', 'bvdtrial', 'cboe', ...] ->>> db.list_tables(library='crsp') +In [4]: db.list_tables(library="crsp") ['aco_amda', 'aco_imda', 'aco_indfnta', 'aco_indfntq', ...] ->>> db.describe_table(library='crsp', table='stocknames') +In [5]: 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 +0 permno True DOUBLE PRECISION +1 namedt True DATE +2 nameenddt True DATE ... ->>> stocknames = db.get_table(library='crsp', table='stocknames', rows=10) ->>> stocknames.head() +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 @@ -73,7 +73,7 @@ Approximately 58957 rows in crsp.stocknames. 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 ->>> db.close() # Close the connection to the database... +In [7]: db.close() # Close the connection to the database. >>> with wrds.Connection() as db: # You can use a context manager ... stocknames = db.get_table(library='crsp', table='stocknames', rows=10) From 4fd3f534b9a145d2e66114cc379496daf2e170a7 Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Wed, 31 Jan 2024 10:21:15 -0500 Subject: [PATCH 5/6] Add context manager example. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b23c9a9..5e56696 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,9 @@ In [7]: stocknames.head() In [7]: db.close() # Close the connection to the database. ->>> with wrds.Connection() as db: # You can use a context manager -... stocknames = db.get_table(library='crsp', table='stocknames', rows=10) ->>> stocknames.head() +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 From 1b1402c968bfecbe9c2ceda45242477771a46661 Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Wed, 31 Jan 2024 13:06:09 -0500 Subject: [PATCH 6/6] Pin low end of dependencies. --- pyproject.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cf32f54..3fad4b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ authors = [ ] license = {text = "BSD-3-Clause"} readme = "README.rst" -requires-python = ">=3.7" +requires-python = ">=3.8" keywords = ["wrds", "finance", "research", "crsp", "compustat"] classifiers = [ "Programming Language :: Python", @@ -36,12 +36,12 @@ classifiers = [ "License :: OSI Approved :: BSD License", ] dependencies = [ - "numpy<1.27", + "numpy>=1.26,<1.27", "packaging<23.3", - "pandas<2.3", - "psycopg2-binary<2.10", - "scipy<1.13", - "sqlalchemy<2.1", + "pandas>=2.2,<2.3", + "psycopg2-binary>=2.9,<2.10", + "scipy>=1.12,<1.13", + "sqlalchemy>=2,<2.1", ] dynamic = ["version"]