Skip to content

Commit e2942b3

Browse files
committed
update sorting order of positional metadata
this seems to be a difference in how pd.concat is sorting the columns, and likely coming up because of the `odd_key` used here (an empty `frozendict`). this may be related to this pandas bug fix that went into pandas 1.5.0: pandas-dev/pandas#47331
1 parent 7d9fa41 commit e2942b3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
'matplotlib >= 1.4.3',
152152
'natsort >= 4.0.3',
153153
'numpy >= 1.9.2',
154-
'pandas >= 1.0.0',
154+
'pandas >= 1.5.0',
155155
'scipy >= 1.9.0',
156156
'h5py >= 2.9.0',
157157
'hdmedians >= 0.14.1',

skbio/sequence/tests/test_sequence.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,11 @@ def test_concat_strict_simple(self):
167167
self.assertFalse(result.metadata)
168168

169169
def test_concat_strict_many(self):
170+
from collections import OrderedDict
170171
odd_key = frozenset()
171172
expected = Sequence("13579",
172-
positional_metadata={'a': list('skbio'),
173-
odd_key: [1, 2, 3, 4, 5]})
173+
positional_metadata={odd_key: [1, 2, 3, 4, 5],
174+
'a': list('skbio')})
174175
result = Sequence.concat([
175176
Sequence("1", positional_metadata={'a': ['s'], odd_key: [1]}),
176177
Sequence("3", positional_metadata={'a': ['k'], odd_key: [2]}),

0 commit comments

Comments
 (0)