Comments (3)
@JBlaschke how large is the Graph
that you're testing with? When Pandas serializes into any format (e.g., pickle, HDF5, SQL, etc.), it will serialize any cells with Object
type data with pickle. This could become a problem with the index of the DataFrame
because it contains nodes in the Graph
. Under normal circumstances, each of these nodes will contain two lists: one of its parent nodes and one of its children nodes. So, when Pandas tries to pickle a node, it will recursively try to pickle each child and parent node. As a result, for large or highly connected graphs, it would be pretty easy to reach Python's (relatively small) recursion depth limit.
This is why, in developing #272 for saving GraphFrame
s to the filesystem, I disconnect the graph and encode that info with integers in a copy of the DataFrame
.
@pearce8 @bhatele, we should probably discuss this during our next meeting.
from hatchet.
This library could be useful for fixing this issue: https://github.com/jmcarpenter2/swifter
It's a Pandas plugin that automatically decides if vectorization, Dask, or Pandas is faster and runs the apply
function using that method. The syntax is pretty nice too. Instead of df.apply(func)
, Swifter's syntax is df.swifter.apply(func)
.
Only question is: do we want to add more dependencies?
from hatchet.
Actually, we probably don't want to use that package. It requires Pandas 1.0.0 or higher, and that version of Pandas doesn't support Python 2.7 (officially, it might work, but it's not a guarantee).
from hatchet.
Related Issues (20)
- Graph Literal Validator
- Elide collapsed subtrees with triangle icons [Roundtrip] HOT 1
- Pan/Zoom on Trees [Roundrip] HOT 1
- Draw Trees to Utilize more Vertical Space [Roundtrip] HOT 2
- Collapse Trees by Default [Roundtrip]
- Add "inplace" to hatchet operations HOT 1
- Add bivariate color map to roundtrip HOT 1
- Make Roundtrip Javascript Loading More Dynamic / Change Javascript Development Workflow HOT 1
- Q: How to read in traces generated by Caliper? HOT 4
- Add a Reader for ROCProfiler HOT 2
- Hatchet multi-process problem when handling large graphs HOT 8
- build error for Python 3.9 HOT 1
- feature request: subtree aggregate, graphframe subtree HOT 4
- import multiprocess as mp HOT 8
- bug in cprofile reader
- Support for Perfetto Trace Format HOT 1
- Filter/squash error on HPCToolkit database: `AttributeError: 'int' object has no attribute '_hatchet_nid'` HOT 2
- build failure on python 3.11, longintrepr.h not found HOT 2
- Error Reading GProf Profiles HOT 3
- Sphinx Api docs section missing doc for submodules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hatchet.