Skip to content

Error in pickle load  #1

@rakeshray

Description

@rakeshray

X_train = pickle.load(handle)

Above statement is giving following error

TypeError Traceback (most recent call last)
in <cell line: 3>()
2 # Load data (deserialize)
3 with open('MachineLearning_Jan23/employee_attrition_dataset/preprocessed_X_sm.pickle', 'rb') as handle:
----> 4 X_train = pickle.load(handle)

/usr/local/lib/python3.10/dist-packages/pandas/core/internals/blocks.py in new_block(values, placement, ndim, refs)
2726 # - maybe_coerce_values already called/unnecessary
2727 klass = get_block_type(values.dtype)
-> 2728 return klass(values, ndim=ndim, placement=placement, refs=refs)
2729
2730

TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got numpy.ndarray)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions