Compare commits

...

3 Commits

Author SHA1 Message Date
amlrelsa-ms
b20bfed33a update samples from Release-113 as a part of SDK release 2021-09-28 19:44:58 +00:00
Harneet Virk
a66a92e338 Merge pull request #1597 from Azure/release_update/Release-112
update samples from Release-112 as a part of  SDK release
2021-09-24 14:44:53 -07:00
amlrelsa-ms
c56c2c3525 update samples from Release-112 as a part of SDK release 2021-09-24 21:40:44 +00:00
2 changed files with 12 additions and 3 deletions

View File

@@ -28,13 +28,21 @@ replaced_distance_vals_df = (replaced_stfor_vals_df.replace({"distance": ".00"},
normalized_df = replaced_distance_vals_df.astype({"distance": 'float64'})
def time_to_us(time_str):
hh, mm , ss = map(int, time_str.split(':'))
return (ss + 60 * (mm + 60 * hh)) * (10**6)
temp = pd.DatetimeIndex(normalized_df["pickup_datetime"])
normalized_df["pickup_date"] = temp.date
normalized_df["pickup_date"] = pd.to_datetime(temp.date)
normalized_df["pickup_time"] = temp.time
normalized_df["pickup_time"] = normalized_df["pickup_time"].apply(lambda x: time_to_us(str(x)))
temp = pd.DatetimeIndex(normalized_df["dropoff_datetime"])
normalized_df["dropoff_date"] = temp.date
normalized_df["dropoff_date"] = pd.to_datetime(temp.date)
normalized_df["dropoff_time"] = temp.time
normalized_df["dropoff_time"] = normalized_df["dropoff_time"].apply(lambda x: time_to_us(str(x)))
del normalized_df["pickup_datetime"]
del normalized_df["dropoff_datetime"]

View File

@@ -272,7 +272,8 @@
"dependencies:\n",
"- python=3.6.2\n",
"- pip:\n",
" - azureml-defaults\n",
" - azureml-core\n",
" - azureml-dataset-runtime\n",
" - keras==2.4.3\n",
" - tensorflow==2.4.3\n",
" - numpy\n",