From user-return-334-archive-asf-public=cust-asf.ponee.io@arrow.apache.org Wed Feb 26 22:57:56 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2EB8818065C for ; Wed, 26 Feb 2020 23:57:56 +0100 (CET) Received: (qmail 27314 invoked by uid 500); 26 Feb 2020 22:57:55 -0000 Mailing-List: contact user-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@arrow.apache.org Delivered-To: mailing list user@arrow.apache.org Received: (qmail 27304 invoked by uid 99); 26 Feb 2020 22:57:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Feb 2020 22:57:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B564DC012B for ; Wed, 26 Feb 2020 22:57:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.199 X-Spam-Level: X-Spam-Status: No, score=-0.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id QxELYMVg2gh6 for ; Wed, 26 Feb 2020 22:57:53 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::144; helo=mail-il1-x144.google.com; envelope-from=wesmckinn@gmail.com; receiver= Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id B73C97DD38 for ; Wed, 26 Feb 2020 22:57:52 +0000 (UTC) Received: by mail-il1-x144.google.com with SMTP id s18so690598iln.0 for ; Wed, 26 Feb 2020 14:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=hJjMYr37+Pydix8KUjPqB3aTk1jmR+k7noWX0tzh/rg=; b=cFieVpjLSQy/kzWE88DGPhVTjZNxFUTkAZsDTnMZy9MoXOP0Hd/xx5LIbxkMcKUYyS bLIXSSPz0iCL4iqXETjpfD3hssk5tKCnoZiODRY8SFjfHzOBO9ltT55ehFip08Xtil5T oNK6u2QAbMi4X7VVrCi1Bi+1dBgn09bMs846NZkdIA0V3qu++YGOVj8gFEJAnYbWYv/q qovXKhjsLCGF5KlZtjyKie8Q7PRAEefsFswOqlP5TYQm9CU45sLMglVuK3bttFuERCSF 8FL6LKR1I2qp3X9W76wmALFp9Mz9D3kZ8fWAzJBEFvAU3ySDXwhUgzb4Aj9O2TyPIG8b tQrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=hJjMYr37+Pydix8KUjPqB3aTk1jmR+k7noWX0tzh/rg=; b=CSImuWWZ47OSAbxxPOdiHHo4aE2pTomq8SHdBMY0ceGpYT/ltU1FO85qXNUCiTPODk thMYqK4eErB/DSAMNScJu4MUEvxM4USBXzBudnsZwgdm/zVD3smSW3BFt999cfEgY0rz wuaE1L56xnY2LMpITV/fsQtHIdLgTO6Myw47Y6xyZUOFfNlValVAKvhq1pKNVxOQeS8K E5AzdDgfq1xbWld4qSOVJ79y0Umv3cWJVAA8NN810+8NWTR54Hhno0qvUvGS6TSGXzl/ 17NuCqnpUTusPW451uykGA5oucQ4wV8FJQx9H1HMiQs1UcVE0lJ29IfqpyrDi4tA2pqE UHlg== X-Gm-Message-State: APjAAAWwcI7+S4iNPErEOhmmCWM0rPpg1EXGJIdw4KCqhl0KFseNl9HD fdJ5FRSzkPiI+j+cGecR91ygQm5OQheCtWzsUNvoGI4U9TQ= X-Google-Smtp-Source: APXvYqzoLF86wB21ArXowU4CnWtF4qRWjQtcFYHWUHGFyqS+KVfmzl8u0NZ7BLqJesTMlIo+AP4oDumxRQ7lgvZ7Yqg= X-Received: by 2002:a92:bf10:: with SMTP id z16mr1306634ilh.87.1582757865109; Wed, 26 Feb 2020 14:57:45 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Wes McKinney Date: Wed, 26 Feb 2020 16:57:07 -0600 Message-ID: Subject: Re: [pyarrow] Table.from_pandas fails with TypeError: infer_dtype() takes no keyword arguments To: user@arrow.apache.org Content-Type: text/plain; charset="UTF-8" hi Filippo, The pandas version is too old to use the pyarrow-pandas functionality (0.20.3 was released in July 2017) -- note however that pandas isn't required to use pyarrow. We wouldn't necessarily be opposed to supporting older versions of pandas so long as there were volunteers willing to do the support / maintenance and testing. I just opened https://issues.apache.org/jira/browse/ARROW-7950 about providing more user feedback when the installed pandas version is too old - Wes On Wed, Feb 26, 2020 at 4:50 PM filippo medri wrote: > > Hi, > trying the example here https://arrow.apache.org/docs/python/pandas.html on DataFrames paragraph with python 2.7.17, numpy==1.16.2 , pandas ==0.20.3, pyarrow==0.16.0 or pyarrow==0.15.1 got an error (see below). > > import pandas as pd > import pyarrow as pa > > df = pd.DataFrame({"a": [1,2,3]}) > table = pa.Table.from_pandas(df) > > fails with the following stacktrace: > > Traceback (most recent call last): > File "", line 1, in > File "pyarrow/table.pxi", line 1177, in pyarrow.lib.Table.from_pandas > File "/home/ubuntu/.pyenv/versions/2.7.17/envs/py27/lib/python2.7/site-packages/pyarrow/pandas_compat.py", line 593, in dataframe_to_arrays > types) > File "/home/ubuntu/.pyenv/versions/2.7.17/envs/py27/lib/python2.7/site-packages/pyarrow/pandas_compat.py", line 234, in construct_metadata > metadata = _get_simple_index_descriptor(level, name) > File "/home/ubuntu/.pyenv/versions/2.7.17/envs/py27/lib/python2.7/site-packages/pyarrow/pandas_compat.py", line 255, in _get_simple_index_descriptor > pandas_type = get_logical_type_from_numpy(level) > File "/home/ubuntu/.pyenv/versions/2.7.17/envs/py27/lib/python2.7/site-packages/pyarrow/pandas_compat.py", line 113, in get_logical_type_from_numpy > result = _pandas_api.infer_dtype(pandas_collection) > File "pyarrow/pandas-shim.pxi", line 131, in pyarrow.lib._PandasAPIShim.infer_dtype > File "pyarrow/pandas-shim.pxi", line 134, in pyarrow.lib._PandasAPIShim.infer_dtype > TypeError: infer_dtype() takes no keyword arguments > > Is some known bug, some incompatibility or some mis-configuration? > Thank you very much, > Filippo Medri