From 19c44947aa249939e69c0dc79d742fbf6c4ecca7 Mon Sep 17 00:00:00 2001 From: Giftlin <31629119+Giftlin@users.noreply.github.com> Date: Wed, 13 Sep 2017 15:52:05 +0530 Subject: [PATCH 1/6] DOC: grammatical mistakes --- pandas/io/stata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 253ed03c25db9..2e7a815b92f53 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -249,7 +249,7 @@ def convert_year_month_safe(year, month): """ Convert year and month to datetimes, using pandas vectorized versions when the date range falls within the range supported by pandas. Other - wise it falls back to a slower but more robust method using datetime. + -wise it falls back to a slower but more robust method using datetime. """ if year.max() < MAX_YEAR and year.min() > MIN_YEAR: return to_datetime(100 * year + month, format='%Y%m') @@ -261,7 +261,7 @@ def convert_year_month_safe(year, month): def convert_year_days_safe(year, days): """ - Converts year (e.g. 1999) and days since the start of the year to a + Converts year (e.g. 1999) and days since the start of the year to datetime or datetime64 Series """ if year.max() < (MAX_YEAR - 1) and year.min() > MIN_YEAR: From 97b6d87064e2384864f1690fc19bf628cf758096 Mon Sep 17 00:00:00 2001 From: Giftlin <31629119+Giftlin@users.noreply.github.com> Date: Wed, 13 Sep 2017 15:54:18 +0530 Subject: [PATCH 2/6] DOC: grammatical mistake --- pandas/io/stata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 2e7a815b92f53..e0f7669bedeab 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -57,7 +57,7 @@ identifier of column that should be used as index of the DataFrame convert_missing : boolean, defaults to False Flag indicating whether to convert missing values to their Stata - representations. If False, missing values are replaced with nans. + representations. If False, missing values are replaced with nan. If True, columns containing missing values are returned with object data types and missing values are represented by StataMissingValue objects. From c9a5ff9112630ffceb60f26abf00a71193421100 Mon Sep 17 00:00:00 2001 From: Giftlin <31629119+Giftlin@users.noreply.github.com> Date: Wed, 13 Sep 2017 16:35:51 +0530 Subject: [PATCH 3/6] Update stata.py --- pandas/io/stata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index e0f7669bedeab..e3799e1f40d96 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -248,8 +248,8 @@ def _stata_elapsed_date_to_datetime_vec(dates, fmt): def convert_year_month_safe(year, month): """ Convert year and month to datetimes, using pandas vectorized versions - when the date range falls within the range supported by pandas. Other - -wise it falls back to a slower but more robust method using datetime. + when the date range falls within the range supported by pandas. + Otherwise it falls back to a slower but more robust method using datetime. """ if year.max() < MAX_YEAR and year.min() > MIN_YEAR: return to_datetime(100 * year + month, format='%Y%m') From b84bee9358d6428de8ec3a107d8963aec3ef9c24 Mon Sep 17 00:00:00 2001 From: Giftlin <31629119+Giftlin@users.noreply.github.com> Date: Wed, 13 Sep 2017 16:58:24 +0530 Subject: [PATCH 4/6] Update stata.py --- pandas/io/stata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index e3799e1f40d96..eb4f4b8c4b31b 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -261,7 +261,7 @@ def convert_year_month_safe(year, month): def convert_year_days_safe(year, days): """ - Converts year (e.g. 1999) and days since the start of the year to + Converts year (e.g. 1999) and days since the start of the year to a datetime or datetime64 Series """ if year.max() < (MAX_YEAR - 1) and year.min() > MIN_YEAR: From 45979b0d9efe008665edc63119b50245cff68aa8 Mon Sep 17 00:00:00 2001 From: Giftlin <31629119+Giftlin@users.noreply.github.com> Date: Wed, 13 Sep 2017 17:03:49 +0530 Subject: [PATCH 5/6] Update stata.py --- pandas/io/stata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index eb4f4b8c4b31b..96e7b101b0de1 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -249,7 +249,8 @@ def convert_year_month_safe(year, month): """ Convert year and month to datetimes, using pandas vectorized versions when the date range falls within the range supported by pandas. - Otherwise it falls back to a slower but more robust method using datetime. + Otherwise it falls back to a slower but more robust method + using datetime. """ if year.max() < MAX_YEAR and year.min() > MIN_YEAR: return to_datetime(100 * year + month, format='%Y%m') From 32f216487c276f476ff091a99a11a31c7ab58336 Mon Sep 17 00:00:00 2001 From: Giftlin <31629119+Giftlin@users.noreply.github.com> Date: Wed, 13 Sep 2017 17:06:22 +0530 Subject: [PATCH 6/6] Update stata.py --- pandas/io/stata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 96e7b101b0de1..92f180506a8b7 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -248,7 +248,7 @@ def _stata_elapsed_date_to_datetime_vec(dates, fmt): def convert_year_month_safe(year, month): """ Convert year and month to datetimes, using pandas vectorized versions - when the date range falls within the range supported by pandas. + when the date range falls within the range supported by pandas. Otherwise it falls back to a slower but more robust method using datetime. """