PYTHON:
%matplotlib inline
import pandas as pdimport datashader as dsfrom datashader import transfer_functions as tffrom colorcet import fire
csv_path= 'nyc_taxi_data_2014.csv'
try: nyctaxi_small = pd.read_csv(csv_path,nrows=10000, usecols=['dropoff_longitude', 'dropoff_latitude'])except: print("Dataset URL is not correct or notdefined:") print("Creating dummy dataset so that code won'tbreak but for assignment, you must use actual dataset.") nyctaxi_small = pd.DataFrame({"dropoff_longitude":[-73, -74], "dropoff_latitude": [40, 41]})
nyctaxi_small.head()
QUESTION:
When i see the canvas it just gives a "." I need the O/Pas below.
Below are the hits:
Q: Can you identify the issue and draw the map like thefollowing?
HINT: https://pandas.pydata.org/pandas-docs/s ... tween.html andhistograms may be helpful.
# Implement. You can use multiple cells to figure out what'sgoing on. # TODO: Once you figure it out, Replace below dummy value of dfnyctaxi_small_filtered with correct value where the issue isresolvednyctaxi_small_filtered = pd.DataFrame({"dropoff_longitude": [-73,-74], "dropoff_latitude": [40, 41]})
Expected O/P:
PYTHON: %matplotlib inline import pandas as pd import datashader as ds from datashader import transfer_functions as tf f
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am