![read a file from desktop to python jupyter notebook read a file from desktop to python jupyter notebook](https://miro.medium.com/max/1400/0*5l8imTsZnIvqFDk4.gif)
Now, note that ASCII files like these are easier to handle for us starters and should show good numbers when opened using notepad or Microsoft excel.
![read a file from desktop to python jupyter notebook read a file from desktop to python jupyter notebook](https://www.caitlincasar.com/post/pycharm/images/new-notebook.png)
![read a file from desktop to python jupyter notebook read a file from desktop to python jupyter notebook](http://community.wateranalytics.org/uploads/default/original/1X/5d3dfea0a549b5ec8aee774305712425e57c19e7.png)
If you would like to use the same data file I am using, you can download it from here. The data file, of a near-infrared spectrum around 900 nm, if opened in a text editor, would look as follows. That is two columns of data – Wavelength is the first column, in nanometers and Intensity is the second column (photon counts, let’s say). The intensity for each color is recorded using a camera. The data in this case is formed by spatially dispersing an input light into its constituent colors (wavelengths of that color). For the uninitiated, a spectrometer is basically a fancy prism with a camera at the rainbow end to take a black and white picture (intensity) of the rainbow. In my lab we use a spectrometer to collect data. I am breaking down the data that I’m going to work with because the things I’m going to talk in this post can be applied to any other data which looks similar – That is, a simple two column data, which when plotted will form a 2D line plot with an x and y-axis. If you do not, then I would first suggest putting a few minutes aside for installing Anaconda and taking a crash course in Jupyter.
Read a file from desktop to python jupyter notebook how to#
I also assume that you have Anaconda installed, or know how to install packages into Python. For this tutorial I am going to assume that you have some idea about using either Jupyter notebook or Python in general.