0
respostas

Join() não Funciona

Ao seguir a instrução passada para realizar a união dos Dataframes:

                                        dataset = dataset\
                                                 .join(unit, 'customerID' , how ='inner')\
                                                 .join(zone, 'customerID', how ='inner')
                                                

Está retornando o seguinte erro: ----------------------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in <cell line: 0>() 1 dataset = dataset ----> 2 .join(unit, 'customerID' , how ='inner') 3 .join(zone, 'customerID', how ='inner')

                                                /usr/local/lib/python3.11/dist-packages/pyspark/sql/dataframe.py in join(self,                                                           other, on, how)
                                                   2491                 on = self._jseq([])
                                                   2492             assert isinstance(how, str), "how should be a string"
                                                -> 2493             jdf = self._jdf.join(other._jdf, on, how)
                                                   2494         return DataFrame(jdf, self.sparkSession)
                                                   2495 

                                                AttributeError: 'NoneType' object has no attribute '_jdf'