Re: Re: Re: Re: Untitled

From Денис, 10 Months ago, written in Plain Text, viewed 272 times. This paste is a reply to Re: Re: Re: Untitled from Денис - view diff
URL http://codebin.org/view/eb16d90d Embed
Download Paste or View Raw
  1. try:
  2.     data['last_price'] = data['last_price'].astype('int64')
  3. except:
  4.     print('last_price int type conversion fail')
  5.    
  6. try:    
  7.     data['first_day_exposition'] = pd.to_datetime(data['first_day_exposition'],format='%Y-%m-%dT%H:%M:%S')
  8. except:
  9.     print('first_day_exposition to_datetime type conversion fail')
  10.    
  11. try:
  12.     data['floors_total'] =  data['floors_total'].astype('Int8')
  13. except:
  14.     print('floors_total int8 type conversion fail')
  15.      
  16. try:
  17.     data['is_apartment'] = data['is_apartment'].map({'False':False, 'True':True})
  18. except:
  19.     print('is_apartment bool type conversion fail')
  20.        
  21. try:
  22.     data['balcony'] = data['balcony'].astype('int8')
  23. except:
  24.     print('balcony int8 type conversion fail')
  25.    
  26. try:
  27.     data['days_exposition'] = round(data['days_exposition']).astype('Int64')
  28. except:
  29.     print('days_exposition int64 type conversion fail')

Replies to Re: Re: Re: Re: Untitled rss

Title Name Language When
Re: Re: Re: Re: Re: Untitled Денис text 10 Months ago.

Reply to "Re: Re: Re: Re: Untitled"

Here you can reply to the paste above