Materializing Views documentation example fails on PageRank and/or "to_df()" call???
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 642
- Forks
- 70
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 21
Description
In the docs for the Raphtory, Graph Views > Materializing Views, there is this example given that fails to run as I try to learn the usage graph analysis
--o
import raphtory.algorithms as algo
grooming_week1 = g.layers(["Grooming"]).window("2019-06-17", "2019-06-24")
print(f"Grooming week 1: {grooming_week1.count_temporal_edges()} edge updates")
cached = grooming_week1.cache_view()
pr = algo.pagerank(cached)
top_baboons = pr.to_df().sort_values("value", ascending=False).head(5)
print(f"\nTop 5 baboons by PageRank in grooming network:")
print(top_baboons.to_string(index=False))
--o
Apparently the error is thrown at "top_baboons = pr.to_df().sort_values("value", ascending=False).head(5)", stating (in VS Code)... AttributeError: 'raphtory.output_node_state.OutputNodeState' object has no attribute 'to_df'
Not sure if this is an oversight or a bug somewhere, thanks in advance for any help in clarifying / resolving.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Graph Views > Materializing Views documentation example and run the PageRank snippet, focusing on the failing pr.to_df() call. Check the returned OutputNodeState API and related examples to determine the supported conversion. Done means the documented example runs successfully and produces the top five results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100