Skip to content

In MAP2 code FileNotFoundError #2

Open

Description

@FranciscoMeav

I got the error below when creating the data frame.
The joint path for unemployement_data was OK (so the csv file was ok).
Not sure what is the problem with pd.read_csv?
Best,
Francisco

FileNotFoundError: [Errno 2] No such file or directory: 'data\us_unemployment.csv'

import folium
import pandas as pd
import os
​
states = os.path.join('data', 'us-states.json')
unemployement_data = os.path.join('data', 'us_unemployment.csv')
state_data = pd.read_csv(unemployement_data)

FileNotFoundError Traceback (most recent call last)
in
----> 1 state_data = pd.read_csv(unemployement_data)

~\anaconda3\lib\site-packages\pandas\io\common.py in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
640 errors = "replace"
641 # Encoding
--> 642 handle = open(
643 handle,
644 ioargs.mode,

FileNotFoundError: [Errno 2] No such file or directory: 'data\us_unemployment.csv'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions