Pandas version checks

  • [X] I have checked that this issue has not already been reported.

  • [X] I have confirmed this bug exists on the latest version of pandas.

  • [X] I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

df = DataFrame({"a": [1.5, 2, 3]})
arr_a = get_array(df, "a")
view = df[:]
df.replace(to_replace=[1.5], value=15.5, inplace=True)
print(arr_a)

Same with to_replace=1.5

Issue Description

arr_a should not get changed

the scalar case is addressed by #50918

Expected Behavior

see above

Installed Versions

Replace this line with the output of pd.show_versions()

Comment From: phofl

Should fix for 2.0

Comment From: lithomas1

@phofl We should be checking everything else in group 2 of the PDEP as well right (adding tests if it works)? (Still would need to check where, fillna(needs tests at the very least), mask, clip)

Comment From: phofl

did not test clip (always forgetting about it), the others all respect cow, also have a pr for fillna

Comment From: lithomas1

Opened a PR for the rest.