title: 'datetime.datetime' has no attribute 'datetime' in python
body: <p>hi i have long code maybe if you wanna check it out tell me, so im trying to solve this and I'm pretty sure the code is right but it keeps getting me the same error, i try everything to solve it but its the same i checked if the attribute missing but its there i don't know what i have done wrong
  this is my code</p>
  
  <pre><code>import pandas as pd
  import geopandas as gpd
  import time
  import pickle
  import os
  import numpy as np
  import xgboost
  import pytz
  import arcgis
  #
  #plotting
  #'''
  from IPython.display import HTML, display
  import datashader as ds
  from datashader import transfer_functions as tf
  from datashader.colors import colormap_select, Greys9, Hot, viridis, inferno
  #'''
  
  import matplotlib.pyplot as plt
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  from matplotlib.ticker import NullFormatter
  import matplotlib as mpl
  mpl.rc('xtick', color='k')
  mpl.rc('ytick', color='k')
  %matplotlib inline
  #'''
  import datetime
  from pandas import Series
  from datetime import datetime, timedelta
  import time
  from datetime import datetime, date, time, timedelta
  
  
  predTimest = pd.date_range('01/06/2017', periods=7*24, freq='H',tz='US/Mountain')
  predTimest
  n [28]:
  
  
  predTimest
  
  
  Out[28]:
  DatetimeIndex(['2017-01-06 00:00:00-07:00', '2017-01-06 01:00:00-07:00',
                 '2017-01-06 02:00:00-07:00', '2017-01-06 03:00:00-07:00',
                 '2017-01-06 04:00:00-07:00', '2017-01-06 05:00:00-07:00',
                 '2017-01-06 06:00:00-07:00', '2017-01-06 07:00:00-07:00',
                 '2017-01-06 08:00:00-07:00', '2017-01-06 09:00:00-07:00',
                 ...
                 '2017-01-12 14:00:00-07:00', '2017-01-12 15:00:00-07:00',
                 '2017-01-12 16:00:00-07:00', '2017-01-12 17:00:00-07:00',
                 '2017-01-12 18:00:00-07:00', '2017-01-12 19:00:00-07:00',
                 '2017-01-12 20:00:00-07:00', '2017-01-12 21:00:00-07:00',
                 '2017-01-12 22:00:00-07:00', '2017-01-12 23:00:00-07:00'],
                dtype='datetime64[ns, US/Mountain]', length=168, freq='H')
  prediction_time = predTimest[15]
  test_df = shapefile.copy()
  test_df['timestamp'] = prediction_time
  test_df['allah1__27'] = shapefile.allah1__27.astype('int64')
  test_df['hour'] = prediction_time.hour
  test_df['weekday'] = prediction_time.weekday()
  test_df['month'] = prediction_time.month
  def add_join_key(df):
      df['join_key'] = df.allah1__27.map(int).map(str)+df.timestamp.map(datetime.datetime.isoformat)
      df = df.set_index('join_key')
      return df
  weath_df = wdf.loc[prediction_time]
  test_df = add_join_key(test_df)
  weath_df = add_join_key(weath_df.reset_index())
  </code></pre>
  
  <p>and it give me this error</p>
  
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-65-4714b1ff587e&gt; in &lt;module&gt;
  ----&gt; 1 test_df = add_join_key(test_df)
        2 weath_df = add_join_key(weath_df.reset_index())
  
  &lt;ipython-input-63-1a4e6a6f2c07&gt; in add_join_key(df)
        1 def add_join_key(df):
  ----&gt; 2     df['join_key'] = df.allah1__27.map(int).map(str)+df.timestamp.map(datetime.datetime.isoformat)
        3     df = df.set_index('join_key')
        4     return df
  
  AttributeError: type object 'datetime.datetime' has no attribute 'datetime'
  </code></pre>