Skip to content

Instantly share code, notes, and snippets.

@nicofarr
Created August 16, 2017 00:56
Show Gist options
  • Select an option

  • Save nicofarr/b91d2c437cb823d0140cfea3baae384d to your computer and use it in GitHub Desktop.

Select an option

Save nicofarr/b91d2c437cb823d0140cfea3baae384d to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hgirv001
Copy link

Hey just started today.

Reference to [in] 90: I wrote the following;
filepath = '/Users/nicolasfarrugia/Desktop/hannah/fnal-triad pairwise similarity (2).xlsx'
datframe = pd.read_excel(filepath,sheetname="triad full model dissimilarity")

It says
(bunnies) C:\Users\hanna>filepath = '/ThisPC/Desktop/finalproject/thesiswriting/results/dissimilaritydata
'filepath' is not recognized as an internal or external command,
operable program or batch file.

Do I need to first define filepath somehow?

@hgirv001
Copy link

(I know my filepath is missing the .xlsx' but first I should fix the issue of it not recognising filepath as a command)

@nicofarr
Copy link
Author

nicofarr commented Aug 18, 2017

you need to write :

filepath = '/ThisPC/Desktop/finalproject/thesiswriting/results/dissimilaritydata.xls'
note that once you started to open a quote after the "=" sign, you can use the TAB key to autocomplement your path. For example, just type C inside the quote and you will be able to scroll through the list of directories, etc...

From the way you say it, I am having a little doubt : are you running this inside a jupyter notebook ? Did you run "jupyter notebook" command, and see the interface in your web browser, where you can create a new notebook, etc...

@nicofarr
Copy link
Author

nicofarr commented Aug 18, 2017

go here and jump directly to the section "Getting Started with Jupyter Notebook"...

Run the following command to open up the application:

jupyter notebook

Then you'll see the application opening in the web browser on the following address: http://localhost:8888. (it should open automatically on Firefox / Chorme or whatever browser you are using .

@hgirv001
Copy link

Hey so I now am running in a jupyter notebook and have completed the introduction to jupyter notebook instructions from the website you sent (thanks for that it was quite fun)
I tried following the first instruction from this recipe but have an error!
I should stop asking you so many questions so was thinking maybe I should leave this for a while and try again next week as it keeps having so many errors. What do you think?

image

ValueError Traceback (most recent call last)
in ()
1 import matplotlib.pyplot as plt
2 import numpy as np
----> 3 import pandas as pd
4 from sklearn.manifold import MDS
5

c:\users\hanna\miniconda3\envs\bunnies\lib\site-packages\pandas_init_.py in ()
24
25 try:
---> 26 from pandas._libs import (hashtable as _hashtable,
27 lib as _lib,
28 tslib as _tslib)

c:\users\hanna\miniconda3\envs\bunnies\lib\site-packages\pandas_libs_init_.py in ()
1 # flake8: noqa
2
----> 3 from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
4
5 # TODO

pandas_libs\src\numpy.pxd in init pandas._libs.tslib (pandas_libs\tslib.c:117317)()

ValueError: numpy.dtype has the wrong size, try recompiling. Expected 88, got 96

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