Skip to content

Change TaggedTable._into_dataloader_with_classes to use to_numpy() instead of values #635

@Marsmaennchen221

Description

@Marsmaennchen221

Is your feature request related to a problem?

Currently, the method uses DataFrame.values to convert a pandas DataFrame into a PyTorch Tensor. It is recommended to use DataFrame.to_numpy() instead, as this does the same, but DataFrame.values could be deprecated soon. In the documentation from DataFrame.values it is also recommended to use DataFrame.to_numpy instead.

Desired solution

Change lines 902 and 911 from torch.Tensor(self.features._data.values), to torch.Tensor(self.features._data.to_numpy),

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

cleanup 🧹Refactorings and other tasks that improve the code

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions