Reputation: 67
I have the following dataframe -
first_name last_name Location Qualification
1 Saif Mehdi Hyderabad M.Tech
2 Rishi Gupta Pune B.Tech
3 Aditi Pandey unknown unkown
4 Poorwa Kunwar Japan B.Tech
5 Rajesh Choudhary Jaipur B.Tech
6 Hari Desai Mumbai M.Tech
7 Sayan Das Kolkata B.Tech
8 Deepjyoti Borah Kolkata B.Tech
9 Bharathi Ganesan R Trichy M.Tech
10 Jayarama Krishna Vizag M.Tech
11 Akhil Gopinath Banglore M.S
Now I want to edit the 4th row's Qualification column
How to do it?
I am new to R
Upvotes: 2
Views: 82
Reputation: 154
You can access the Qualification
column via df$Qualification
, where df
is your data frame. Then, you can access the 4th element of that via df$Qualification[4]
. To replace the existing value with a new value, new_value
, you can write: df$Qualification[4] <- new_value
.
Upvotes: 1