havakv / pycox

Survival analysis with PyTorch
BSD 2-Clause "Simplified" License
780 stars 180 forks source link

Issue in function cox_time.py #157

Open jensrobben opened 1 year ago

jensrobben commented 1 year ago

Since the release of pandas 2.0.0, the function iteritems is depreciated. (see https://pandas.pydata.org/docs/dev/whatsnew/v2.0.0.html). Because of this, the function cox_time.py doesn't work anymore, can this be updated? I cannot give a reproducible example because I worked with the package 'survivalmodels' in R that loads in the cox_time.py function from Python.

chengzhishi commented 10 months ago

I tried two ways and they both seem to be working.

  1. downgrade pandas to 1.8
  2. Change the data.py by switching iteritems->items