str-replace

randomly replacing a specific value in a dataset with frac in pandas

randomly replacing a specific value in a dataset with frac in pandas Question: I’ve got a dataset with some missing values as " ?" in just one column I want to replace all missing values with other values in that column (Feature1) like this: Feature1_value_counts = df.Feature1.value_counts(normalize=True) the code above gives me the number I …

Total answers: 1

How to replace the first n numbers of a specific character in a string

How to replace the first n numbers of a specific character in a string Question: I’m new to computer science and really stuck on this question so any help would be great :). Firstly I was given the following global variable: ARROWS = ‘<>^v’ The idea is to create a function that takes in a …

Total answers: 4

unbale to replace method in python

unbale to replace method in python Question: My problem is that I have to replcae the value in the remarked column and store it all in a new varble. EXMP: – Wherever there is "True" in the Remark column, that "Data" gets updated. I have tried many times but I am not able to get …

Total answers: 1