Return-Path: X-Original-To: apmail-spark-user-archive@minotaur.apache.org Delivered-To: apmail-spark-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0335D1821F for ; Fri, 9 Oct 2015 18:05:01 +0000 (UTC) Received: (qmail 51648 invoked by uid 500); 9 Oct 2015 18:04:42 -0000 Delivered-To: apmail-spark-user-archive@spark.apache.org Received: (qmail 51551 invoked by uid 500); 9 Oct 2015 18:04:42 -0000 Mailing-List: contact user-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@spark.apache.org Received: (qmail 51541 invoked by uid 99); 9 Oct 2015 18:04:42 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2015 18:04:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B064FC1790 for ; Fri, 9 Oct 2015 18:04:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Ky1bmLsAG3hT for ; Fri, 9 Oct 2015 18:04:34 +0000 (UTC) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id BF39A2315E for ; Fri, 9 Oct 2015 18:04:33 +0000 (UTC) Received: by lbwr8 with SMTP id r8so88525197lbw.2 for ; Fri, 09 Oct 2015 11:04:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=nldqnc75w2ejvQiH0NyONuWxVRbZfHuyHyGTy0bGoFQ=; b=X694+icw3vPuBCoBRYxlluETi1lpwQ3JgYlK2V5071f3a34hvc8637jyleyqQjjSHa rT7MmKUn8IeENHNzlfp8ak/9Yjaxiczsty59LbYUySbF5KjS91PVPZ58DwoNqqwYHAD5 Bdsux4Ia1vz4l9/yQ3owOIQDgijddb//j2v0i6Af3YU/hdXtyy1Si1RN/dcuobNogT4z 23YcGfEzbok35G1RsBz0ZwUlWxcK8pwpqyK3VlLyeqYw31zOtB1dZkDfdaYO+p6a8sTe UhcOlSnPPSBpzk/P3Snh1N5beeZ6ShpPaDFluOe1qb6KfSlsoWV27PQNACIT+q/7WyZl oHHA== X-Gm-Message-State: ALoCoQknnalcnu6zMrlBV5b6D9YXTGBI6/6C3vCjj8mFou6giJU1uyGb99ZvqP2c84c5hdyNlR+G MIME-Version: 1.0 X-Received: by 10.25.27.72 with SMTP id b69mr4807298lfb.90.1444413873219; Fri, 09 Oct 2015 11:04:33 -0700 (PDT) Received: by 10.25.81.200 with HTTP; Fri, 9 Oct 2015 11:04:33 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Oct 2015 11:04:33 -0700 Message-ID: Subject: Re: weird issue with sqlContext.createDataFrame - pyspark 1.3.1 From: Davies Liu To: ping yan Cc: user Content-Type: text/plain; charset=UTF-8 Is it possible that you have an very old version of pandas, that does not have DataFrame (or in different submodule). Could you try this: ``` >>> import pandas >>> pandas.__version__ '0.14.0' ``` On Thu, Oct 8, 2015 at 10:28 PM, ping yan wrote: > I really cannot figure out what this is about.. > (tried to import pandas, in case that is a dependency, but it didn't help.) > >>>> from pyspark.sql import SQLContext >>>> sqlContext=SQLContext(sc) >>>> sqlContext.createDataFrame(l).collect() > Traceback (most recent call last): > File "", line 1, in > File > "/opt/cloudera/parcels/CDH-5.4.2-1.cdh5.4.2.p0.2/lib/spark/python/pyspark/sql/context.py", > line 318, in createDataFrame > if has_pandas and isinstance(data, pandas.DataFrame): > AttributeError: 'module' object has no attribute 'DataFrame' > > Would appreciate any pointers. > > Thanks! > Ping > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@spark.apache.org For additional commands, e-mail: user-help@spark.apache.org