use is use numpy.where
import numpy
my_data['category']=numpy.where(my_data.category=="WD",'TRUE,my_data.category)
by the way , Please edit and update your question to answer it more better , We are happy to help
More Related Contents:
- Can we develop a Python API which wraps R code [closed]
- Store large data or a service connection per Flask session
- How to install R packages that are not available in “R-essentials”?
- How to create a density plot in matplotlib?
- groupby weighted average and sum in pandas dataframe
- rpy2 install on windows 7
- Python’s equivalent for R’s dput() function
- auto.arima() equivalent for python
- What are Python pandas equivalents for R functions like str(), summary(), and head()?
- Plotting the data with scrollable x (time/horizontal) axis on Linux
- Converting python objects for rpy2
- R and Python in one Jupyter notebook
- Running R script from python
- How to make a sunburst plot in R or Python?
- R expand.grid() function in Python
- Creating same random number sequence in Python, NumPy and R
- Conda reports PackagesNotFoundError: python=3.1 for reticulate environment
- How to setup environment variable R_user to use rpy2 in python
- Does R have function startswith or endswith like python? [closed]
- OSError: cannot load library ‘C:\Program Files\R\R-4.0.2\bin\x64\R.dll’: error 0x7e
- Circular shift of vector (equivalent to numpy.roll)
- Placing Custom Images in a Plot Window–as custom data markers or to annotate those markers
- How do Rpy2, pyrserve and PypeR compare?
- Loading .RData files into Python
- How to convert R dataframe back to Pandas using rpy2?
- How to create an empty R vector to add new items
- Computing cross-correlation function?
- Excel, How to split cells by comma delimiter into new cells
- Using a dictionary to count the items in a list [duplicate]
- Split a list into parts based on a set of indexes in Python