Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 18 13:38
    papajohn commented #414
  • Sep 18 05:53
    adnanhemani commented #414
  • Sep 18 01:11
    davidwagner opened #414
  • Sep 17 22:21

    adnanhemani on gh-pages

    Generated by commit 23b4f5f6482… (compare)

  • Sep 17 22:04

    adnanhemani on gh-pages

    Generated by commit 23b4f5f6482… (compare)

  • Sep 17 21:13

    davidwagner on fix_version_15_2

    (compare)

  • Sep 17 21:13

    davidwagner on master

    fixed bug from previous version CHANGELOG Delete top_movies.csv Accident… and 2 more (compare)

  • Sep 17 21:13
    davidwagner closed #413
  • Sep 17 20:37

    adnanhemani on gh-pages

    Generated by commit ec024b264ff… (compare)

  • Sep 17 20:32

    davidwagner on travis_doesnt_like_libgfortran

    (compare)

  • Sep 17 20:32

    davidwagner on master

    Try removing libgfortran depend… Merge pull request #412 from da… (compare)

  • Sep 17 20:32
    davidwagner closed #412
  • Sep 16 17:04
    SamLau95 commented #412
  • Sep 16 06:23
    adnanhemani commented #412
  • Sep 16 06:16

    adnanhemani on fix_version_15_2

    Delete hist_workout_2.ipynb Ac… (compare)

  • Sep 16 06:16
    adnanhemani synchronize #413
  • Sep 16 06:15

    adnanhemani on fix_version_15_2

    Delete top_movies.csv Accident… (compare)

  • Sep 16 06:15
    adnanhemani synchronize #413
  • Sep 16 06:09
    adnanhemani review_requested #413
  • Sep 16 06:09
    adnanhemani review_requested #413
Chris Holdgraf
@choldgraf
and it looks like that function has indeed been updated. Here's the new code for it: np.array([fn(*[self.take(i)[col][0] for col in column_label]) for i in range(self.num_rows)])
note that there is another for loop: for col in column_label so now it's passing each column that you give individually, that way it never tries to pass a list
so try pulling and it should work
Carl Boettiger
@cboettig
interesting... so somehow I am running an old version of datascience even though it says 0.3.dev21 ?
I'm running this on ds8.berkeley.edu, so I have no ability to install there, but let me try locally. What version are you on?
Chris Holdgraf
@choldgraf
ah interesting
same version
but w/o knowing much about how the repo is organized, that's probably just the current dev branch
and presumably the version of that code being used in ds8 is a few commits behind the branch on github
Carl Boettiger
@cboettig
maybe version number didn't get bumped;
right.
um, so can you reproduce the error on your ds8.berkeley.edu account?
(and I'll try pulling and installing locally)
Chris Holdgraf
@choldgraf
I.......haven't figured that out yet :)
Carl Boettiger
@cboettig
hehe, what happens when you go to ds8.berkeley.edu and try to log in with your berkeley google account?
Chris Holdgraf
@choldgraf
ooo it works
Carl Boettiger
@cboettig
nice
Sam Lau
@SamLau95
oh, you know what?
it’s possible that we haven’t pushed a new version to the servers
i mean
we haven’t incremented the version number after making that change
Carl Boettiger
@cboettig
right
Sam Lau
@SamLau95
blah, that’s a pain
maybe there’s a way to locally install the datascience package from the github repo on ds8
Chris Holdgraf
@choldgraf
yeah I get the error on the ds8 servers
Sam Lau
@SamLau95
that makes sense
Chris Holdgraf
@choldgraf
I mean, could you theoretically just glone the datascience repo using a terminal in the ipyntbk and then make install from there?
Sam Lau
@SamLau95
yeah, that might work
i have to bother ryan manually to update the package version on the ds8 server so it’s not something i can take care of right this minute
Chris Holdgraf
@choldgraf
hmmm, I just tried cloning + make install and it threw a permissions error
I guess I could try to specify a folder w/in my home directory, but now we are getting into the territory of "too much of a hassle to be a solution for instructors" I think
Carl Boettiger
@cboettig
Okay, well at least my code is running successfully after pulling the latest github copy and running make
(I'm running the the jupyter/datascience-notebook docker image, so I just docker exec'd in and ran make as root, so no permissions error for me ;-) )
So once the update hits the ds8 server, my issue should be resolved. though bumping the version would be good too.
Chris Holdgraf
@choldgraf
cool
@SamLau95 PR made for the python3 check
Sam Lau
@SamLau95
merged! thanks
Carl Boettiger
@cboettig
@choldgraf Another quick puzzle for you:
nasa_temp = "http://climate.nasa.gov/system/internal_resources/details/original/647_Global_Temperature_Data_File.txt"
temp = ds.Table.read_table(nasa_temp, skiprows=range(4), na_values = "*", delim_whitespace=True, 
                    names=["Year", "Annual", "FiveYear"])

## Pandas plots this just fine
temp.to_df().plot()

## datascience not so much
temp.plot("Year")
plt.plot(temp["Year"], temp["Annual"])
Some error about getting a string when it expects a float. I still haven't made sense of the idea that a column in Tables need not have a consistent type. Is that really the case? why?
Sam Lau
@SamLau95

@cboettig this is what i get from the last 5 rows of the temp table:

Year                                 | Annual | FiveYear
2012                                 | 0.63   | 0.67
2013                                 | 0.66   | nan
2014                                 | 0.75   | nan
2015                                 | nan    | nan
------------------------------------ | nan    | nan

looks like you have some missing values and a string, too

Chris Holdgraf
@choldgraf
Yeah it looks like that big ------- is the problem. You could always drop the last row, aka this works:
temp = temp.take(range(temp.num_rows-1))
temp.plot('Year')
Sam Lau
@SamLau95
or, for a slightly more succinct first line:
temp = temp.take[:-1]
Chris Holdgraf
@choldgraf
or you could write a function that does "for each row in this column, try to cast it as an integer. If it errors, return np.nan. Then you could make one more pass and drop any rows == nan
oo @SamLau95 thanks for the tip, didn't know that Table take behaves like pandas iloc
Sam Lau
@SamLau95
yup, it was done in #120
Carl Boettiger
@cboettig
@SamLau95 @choldgraf Really nice, thanks for catching that. Also good to know that take can use [] like iloc, pretty cool; but I agree with the thread in that PR that having both notations is confusing to a beginner; I've already made that mistake on iloc before. Will have to decide what is better to teach the students.
henryem
@henryem
FYI, for the main course, we're talking about not using square bracket indexing at all, at least for the first few weeks
Since that was very confusing for students last semester
Carl Boettiger
@cboettig
@henryem thanks, good to know! Then I probably shouldn't introduce square brackets on my first lesson! I suppose I should just pre-clean the data so none of that is necessary; though I really do hope to convey some sense of "where data comes from" in my area, even if it does mean teaching a little bit of simple data cleaning...
henryem
@henryem
We'll still do indexing, just with method calls instead of []