googlesamples / assistant-sdk-python

Samples and bindings for the Google Assistant API
http://developer.google.com/assistant/sdk
Apache License 2.0
916 stars 320 forks source link

ImportError: cannot import name 'datetools' #393

Open giselleCouto opened 4 years ago

giselleCouto commented 4 years ago

Ao fazer a importação destas bibliotecas recebo o seguinte erro:

Importe as bilbiotecas

import itertools import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter import pandas as pd import numpy as np import matplotlib.ticker as ticker from sklearn import preprocessing import os import seaborn as sns # visualization from scipy import stats from scipy.stats import norm import warnings from sklearn.tree import DecisionTreeClassifier warnings.filterwarnings('ignore') #ignore warnings

%matplotlib inline import gc

import statsmodels.api as sm from statsmodels.formula.api import ols

ModuleNotFoundError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\statsmodels\compat\pandas.py in 52 try: ---> 53 import pandas.tseries.tools as datetools 54 import pandas.tseries.frequencies as frequencies

ModuleNotFoundError: No module named 'pandas.tseries.tools'

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)

in 19 import gc 20 ---> 21 import statsmodels.api as sm 22 from statsmodels.formula.api import ols ~\Anaconda3\lib\site-packages\statsmodels\api.py in 5 from . import regression 6 from .regression.linear_model import OLS, GLS, WLS, GLSAR ----> 7 from .regression.recursive_ls import RecursiveLS 8 from .regression.quantile_regression import QuantReg 9 from .regression.mixed_linear_model import MixedLM ~\Anaconda3\lib\site-packages\statsmodels\regression\recursive_ls.py in 14 from statsmodels.regression.linear_model import OLS 15 from statsmodels.tools.data import _is_using_pandas ---> 16 from statsmodels.tsa.statespace.mlemodel import ( 17 MLEModel, MLEResults, MLEResultsWrapper) 18 from statsmodels.tools.tools import Bunch ~\Anaconda3\lib\site-packages\statsmodels\tsa\statespace\mlemodel.py in 15 from .kalman_filter import (KalmanFilter, FilterResults, INVERT_UNIVARIATE, 16 SOLVE_LU) ---> 17 import statsmodels.tsa.base.tsa_model as tsbase 18 import statsmodels.base.wrapper as wrap 19 from statsmodels.tools.numdiff import (_get_epsilon, approx_hess_cs, ~\Anaconda3\lib\site-packages\statsmodels\tsa\base\tsa_model.py in 1 from statsmodels.compat.python import lrange, long ----> 2 from statsmodels.compat.pandas import is_numeric_dtype 3 4 import datetime 5 ~\Anaconda3\lib\site-packages\statsmodels\compat\pandas.py in 54 import pandas.tseries.frequencies as frequencies 55 except ImportError: ---> 56 from pandas.core import datetools 57 frequencies = datetools **ImportError: cannot import name 'datetools'**
Fleker commented 4 years ago

Seems like you need to install Pandas? This is unrelated to this project.