May-12-2018, 10:50 AM
Hi there,
I have three different csv-files (chicago.csv, new_yourk.csv and washington.csv) I want to write a code where I will ask a user to choose one of the city from this files:
This is ma code:
But my while loop doesn't work. could somebody please help
J
I have three different csv-files (chicago.csv, new_yourk.csv and washington.csv) I want to write a code where I will ask a user to choose one of the city from this files:
This is ma code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import time import pandas as pd import numpy as np CITY_DATA = { 'chicago' : 'chicago.csv' , 'new york city' : 'new_york_city.csv' , 'washington' : 'washington.csv' } def get_filters(): print ( 'Hello! Let\'s explore some US bikeshare data!' ) print ( 'Would you like to see data for Chicago, New York, or Washington' ) # get user input for city (chicago, new york city, washington). Cities = ( 'Chicago' , 'New York' , 'Washington' ) while city in cities: print city |

J