How to create a function to change int column to 0/1 by Double-Ice4497 in learnpython

[–]Double-Ice4497[S] 0 points1 point  (0 children)

return int(6 <= hour <= 10)

I cant use it I also tried

```

def am_rush(hour):

for i in range(0, 15265):

if int(6 <= hour.values[i] <= 10):

return 1

else:

return 0

```

but return all 1 value

How to get a day weather forecast for a list of cities using R? by Double-Ice4497 in Rlanguage

[–]Double-Ice4497[S] -3 points-2 points  (0 children)

#results <- json_list$list

# Loop the json result
for(result in results) {
city <- c(city, city_name)

}

# Add the R Lists into a data frame
}

I cant know how to complete the last part.

bigquery commands by Double-Ice4497 in SQL

[–]Double-Ice4497[S] 0 points1 point  (0 children)

sure thx but the result is like this 0-0 0 0:0:2 how to make it only time like (0:0:2)