GeoDaCenter / spatial_access

https://spatial.uchicago.edu
37 stars 11 forks source link

to_csv doesn't work if folder doesn't exist #91

Open angela-li opened 4 years ago

angela-li commented 4 years ago

In the demo, the to_csv() function in cell 16 will return an error because the function does not create the "models" folder if it does not already exist. (it's a pandas issue: https://github.com/pandas-dev/pandas/issues/24306)

Perhaps convert the data type from a pandas dataframe to a matrix & write to csv? Or check if folder exists, if not create it. Or in the demo notebook, include a note that says "Please create a models directory if you don't have one".