Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weights constructor behaving unexpectedly with dataframe IDs #183

Open
darribas opened this issue Sep 2, 2019 · 5 comments
Open

Weights constructor behaving unexpectedly with dataframe IDs #183

darribas opened this issue Sep 2, 2019 · 5 comments
Labels
bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. needs decision A design decision that needs input from other maintainers/developers. no-issue-activity weights
Milestone

Comments

@darribas
Copy link
Member

darribas commented Sep 2, 2019

Attached full (reproducible, zipped) notebook, but the gist of it is:

Annotation 2019-09-02 162802

From the docstring:

idVariable  : string
                    the name of the column to use as IDs. If nothing is
                    provided, the dataframe index is used

Shoudn't [5] output be the same as [4]?

weights_ids.zip

@sjsrey
Copy link
Member

sjsrey commented Sep 2, 2019

This is not working as documented.

@sjsrey sjsrey added the bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. label Sep 2, 2019
@jGaboardi
Copy link
Member

jGaboardi commented Sep 2, 2019

In the case of [5] the conditionals in line 325, line 335, line 337 are False so line 339(below) is running with the idVariable, ids, and id_order arguments still being None.

w = cls.from_iterable(df[geom_col].tolist(), ids=ids, id_order=id_order, **kwargs)

Should the documentation change or the functionality?

@jGaboardi jGaboardi added this to the next milestone Sep 2, 2019
@sjsrey
Copy link
Member

sjsrey commented Sep 2, 2019

I'm working on changing the functionality (in libpysal) so we get something like:

2019-09-02-1642-1567467775-sel

@jGaboardi
Copy link
Member

#184

@ljwolf ljwolf added the needs decision A design decision that needs input from other maintainers/developers. label Jan 4, 2020
@github-actions
Copy link

github-actions bot commented Mar 5, 2020

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. needs decision A design decision that needs input from other maintainers/developers. no-issue-activity weights
Projects
None yet
Development

No branches or pull requests

4 participants