[Debian-med-packaging] Bug#1044064: Help needed fpr last Pandas issue in pyrange (Was: q2-taxa: test failure with pandas 2.1)

Andreas Tille andreas at fam-tille.de
Sun Feb 18 10:05:55 GMT 2024


Control: tags -1 help

Hi again,

Am Sat, Feb 17, 2024 at 07:31:48PM +0100 schrieb s3v:
> More immediate fix is attached but I guess there is a more elegant
> way by changing the code in _ids_to_keep_from_taxonomy() function.

thanks a lot for all your fixes you provided for Debian Med packages.
There are a few remaining issues, which I would love to ask you step by
step.  I found a patch for pyranges[1] which solves all issues but one:


>    pd.testing.assert_frame_equal(df1, df2)
E    AssertionError: Attributes of DataFrame.iloc[:, 7] (column name="Cluster") are different
E      
E    Attribute "dtype" are different
E    [left]: int32
E    [right]: int64 


My attempt to fix this by

+--- a/tests/helpers.py
++++ b/tests/helpers.py
+@@ -57,6 +57,7 @@ def assert_df_equal(df1, df2):
+     print(df2.index)
+     print("index equal", df1.index == df2.index)
+ 
++    df1["Cluster"] = df1["Cluster"].astype(np.int64)
+     pd.testing.assert_frame_equal(df1, df2)
+ 
+     pd.options.mode.chained_assignment = "warn"

totally failed and introduced a new series of failures basically saying

>   ???     
E   KeyError: 'Cluster'

pandas/_libs/hashtable_class_helper.pxi:7088: KeyError

Any suggestion how to fix that issue?

Kind regards
     Andreas.



[1] https://salsa.debian.org/med-team/pyranges/-/blob/master/debian/patches/pandas2.0.patch?ref_type=heads

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list