How to import hosing data in jupyter notebook and anaconda terminbal also?

I have installed python on my laptop.I am using it .

But since when i use pd.read_csv(“dataset/housing.csv”)

It shows this


FileNotFoundError Traceback (most recent call last)
in
1 #overview
----> 2 housing = pd.read_csv(“dataset/hosuing.csv”)

C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision)
674 )
675
–> 676 return _read(filepath_or_buffer, kwds)
677
678 parser_f.name = name

C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds)
446
447 # Create the parser.
–> 448 parser = TextFileReader(fp_or_buf, **kwds)
449
450 if chunksize or iterator:

C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py in init(self, f, engine, **kwds)
878 self.options[“has_index_names”] = kwds[“has_index_names”]
879
–> 880 self._make_engine(self.engine)
881
882 def close(self):

C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py in _make_engine(self, engine)
1112 def _make_engine(self, engine=“c”):
1113 if engine == “c”:
-> 1114 self._engine = CParserWrapper(self.f, **self.options)
1115 else:
1116 if engine == “python”:

C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py in init(self, src, **kwds)
1889 kwds[“usecols”] = self.usecols
1890
-> 1891 self._reader = parsers.TextReader(src, **kwds)
1892 self.unnamed_cols = self._reader.unnamed_cols
1893

pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader.cinit()

pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

FileNotFoundError: [Errno 2] File dataset/hosuing.csv does not exist: ‘dataset/hosuing.csv’

i am using jupyter through anaconda installed on my laptop not from cloudxlab

so please tell me how can i import hosing datasets on my anaconda installed on my laptop?

please reply.

You need to have the dataset present in your laptop before you can access it, you would not be able to access the datasets present in the lab from your laptop. You can download the dataset by opening it in lab and then copy pasting it in a file on your laptop.

i want to download it on my laptop anaconda

How can i import it on my own anaconda software?

using anaconda terminal or jupyter notebook?

Please reply.

You cannot do it using anaconda or Jupyter. You need to follow the procedure I suggested.

Please tell me the steps so i can do.
please reply

First, load the dataset in the lab (using read_csv() or similar functions), then save it in a dataframe. Finally, use export the dataframe to a csv format at a location of your choice in the lab:

Finally, select that new file your saved from the Jupyter dashboard, and then download it to your local system.

i did it.
i imported housing data set into python.

Thank you

2 Likes