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

Pandas object type cannot be represented as a node feature #2067

Open
nevzatseferoglu opened this issue Nov 19, 2022 · 0 comments
Open

Pandas object type cannot be represented as a node feature #2067

nevzatseferoglu opened this issue Nov 19, 2022 · 0 comments
Labels
bug Something isn't working sg-library

Comments

@nevzatseferoglu
Copy link

Describe the bug

I created a DataFrame which has a series that is object type. I cannot use the row of this object type as a feature of single node. I'm initiating stellar graph with following code by using my custom dataset that i attached as a screenshot below.

square_node_data = pd.DataFrame(
    {'of': nf_obj, 'nf': nf_num}, index=from_node_ids
)
square_node_features = StellarGraph(square_node_data, square_edges)

Stellar graph initialization gives an error as:

ValueError: could not convert string to float: 'object_feature_A'

Screen Shot 2022-11-19 at 02 02 05
Screen Shot 2022-11-19 at 02 02 32

It seems that there is no support for the feature as numpy object type. I want to ensure it because I couldn't find the answer in the documentation. Maybe there is an another way of giving that feature type 🤔

@nevzatseferoglu nevzatseferoglu added bug Something isn't working sg-library labels Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sg-library
Projects
None yet
Development

No branches or pull requests

1 participant