question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature request] support for user-level metadata

See original GitHub issue

Idea would be to allow a restricted metadata to be attached globally? per-column? of types that are serializable by feather. something like. The usecase I am thinking is to allow pandas to support complete round-tripping.

e.g.

In [3]: df = pd.DataFrame({'A' : ['foo','foo','bar'], 'B' : [1,2,3]})

In [4]: df
Out[4]: 
     A  B
0  foo  1
1  foo  2
2  bar  3

In [5]: feather.write_dataframe(df, 'foo.fth')

In [6]: feather.read_dataframe('foo.fth')
Out[6]: 
     A  B
0  foo  1
1  foo  2
2  bar  3

In [7]: feather.read_dataframe('foo.fth').equals(df)
Out[7]: True

In [8]: sdf = df.set_index('A')

In [9]: sdf
Out[9]: 
     B
A     
foo  1
foo  2
bar  3

In [10]: feather.write_dataframe(sdf, 'foo.fth')

In [11]: feather.read_dataframe('foo.fth')
Out[11]: 
   B
0  1
1  2
2  3

so on [11] loosing the ‘metadata’. But in a pandas wrapper if I could do:

feather.write_data_frame(sdf.reset_index(), 'foo.fth', {'index' : ['A']})

df, metadata = feather.read_frame('foo.fth', return_metadata=True)
df = df.set_index(metadata['index'])

Then I could round-trip exactly.

HDF5 allows support for arbitrary metadata on the group nodes (it just pickles this). But I think that would be out-of-scope here as its not cross-lang compat.

I think this would nicely solve the representation problem (everything still stored as table likes), but the metadata can offer an alternative interpretation w/o getting in the way of others.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hadleycommented, May 5, 2016

@ScottPJones you’d be better off starting a new issue to discuss this

0reactions
wesmcommented, Apr 10, 2020

With Feather V2 coming in Arrow 0.17.0 we support all the metadata storage features that Arrow schemas have, which cover the use cases here I think

Read more comments on GitHub >

github_iconTop Results From Across the Web

DataHub Feature Requests
Vote or request new DataHub Feature Requests features. Subscribe to get updates about new features from DataHub Feature Requests.
Read more >
Metadata Maps - Customer Support - NetX
This feature provides the ability to embed NetX attribute values into an asset file when a download or share action is executed. Setup....
Read more >
Jaeger: Track request and user-level metadata on rails root span
Jaeger: Track request and user-level metadata on rails root span. There's a bunch of extra tags that we should add to the rails...
Read more >
Anyway to attach custom metadata to a user's payment
We need to add some metadata (key-values) to user's payments. ... supported by RevenueCat, but we've added this as a feature request.
Read more >
Feature request: Provide method to retrieve application “client ...
Since there are possible security ramifications to exposing the Client Metadata, I suggest a new toggle option available on the tenant and/or on ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found