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

TaggedList is unnecessary for data.frames #2

Closed
flying-sheep opened this issue May 22, 2014 · 1 comment
Closed

TaggedList is unnecessary for data.frames #2

flying-sheep opened this issue May 22, 2014 · 1 comment

Comments

@flying-sheep
Copy link
Contributor

see here

>>> a = np.array([('a', 1), ('b', 2)], dtype=[('h1', '<U1'), ('h2', '<i4')])
>>> a['h1']
array(['a', 'b'], dtype='<U1')
>>> a[a.dtype.names[0]]
array(['a', 'b'], dtype='<U1')
>>> a[0]
('a', 1)

and if we really need easy indexing by col number, this class is better in every respect (performance, versatility, …)

@flying-sheep flying-sheep changed the title TaggedList is unnecessary TaggedList is unnecessary for data.frames May 22, 2014
@ralhei
Copy link
Owner

ralhei commented Jun 18, 2014

Hi,
sorry for the very late reply, this message just slipped through.
You are right, the TaggedList class is just a stupid helper class because I didn't find anything appropriate (without putting too much research into it, to be honest ...)
What I definitely want to avoid is a dependency to any other major package just for the sake of replacing this class, which is why I'm not too keen to borough anything from the pydata project in the moment.

@ralhei ralhei closed this as completed May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants