From abac7c9ec21391a1619452a4f65542710bea89b9 Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Mon, 27 Jul 2020 11:54:25 +0100 Subject: [PATCH] MAINT: Fix issue in StataReader due to upstream changes Avoid creating an array of dtypes to workaround NumPy future change closes #35426 --- pandas/io/stata.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 7677d8a94d521..3717a2025cf51 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -1643,8 +1643,7 @@ def read( data = self._insert_strls(data) - cols_ = np.where(self.dtyplist)[0] - + cols_ = np.where([dtyp is not None for dtyp in self.dtyplist])[0] # Convert columns (if needed) to match input type ix = data.index requires_type_conversion = False