I want to compile only rows containing odd numbers in one of the columns. An example of my data frame is below:
V1 V2 V3 V4 V5 V6 V7 V8
14221 USDJPY 20030507 20:00:00 116.33 116.19 116.47 116.25
14222 USDJPY 20030507 21:00:00 116.24 116.24 116.42 116.32
14223 USDJPY 20030507 22:00:00 116.33 116.29 116.42 116.40
14224 USDJPY 20030507 23:00:00 116.42 116.34 116.44 116.42
14227 USDJPY 20030508 02:00:00 116.48 116.42 116.67 116.58
14228 USDJPY 20030508 03:00:00 116.57 116.50 116.65 116.62
14229 USDJPY 20030508 04:00:00 116.61 116.59 116.67 116.62
14230 USDJPY 20030508 05:00:00 116.63 116.62 116.72 116.63
14231 USDJPY 20030508 06:00:00 116.64 116.56 116.64 116.62
14232 USDJPY 20030508 07:00:00 116.62 116.57 116.67 116.58
14264 USDJPY 20030509 15:00:00 117.40 117.29 117.44 117.29
14265 USDJPY 20030509 16:00:00 117.30 117.19 117.34 117.20
14266 USDJPY 20030509 17:00:00 117.19 117.19 117.26 117.19
14267 USDJPY 20030509 18:00:00 117.18 117.17 117.26 117.20
14268 USDJPY 20030509 19:00:00 117.22 117.17 117.25 117.19
14269 USDJPY 20030509 20:00:00 117.18 117.17 117.24 117.22
14270 USDJPY 20030509 21:00:00 117.23 117.18 117.25 117.18
14271 USDJPY 20030512 00:00:00 117.25 117.08 117.25 117.09
14272 USDJPY 20030512 01:00:00 117.10 116.59 117.10 116.99
14273 USDJPY 20030512 02:00:00 116.98 116.89 117.01 116.93
14274 USDJPY 20030512 03:00:00 116.94 116.84 116.94 116.88
I would like to take a subset of data which contain rows that has odd numbers in column V3 such that my new data frame will be as below:
V1 V2 V3 V4 V5 V6 V7 V8
14221 USDJPY 20030507 20:00:00 116.33 116.19 116.47 116.25
14222 USDJPY 20030507 21:00:00 116.24 116.24 116.42 116.32
14223 USDJPY 20030507 22:00:00 116.33 116.29 116.42 116.40
14224 USDJPY 20030507 23:00:00 116.42 116.34 116.44 116.42
14264 USDJPY 20030509 15:00:00 117.40 117.29 117.44 117.29
14265 USDJPY 20030509 16:00:00 117.30 117.19 117.34 117.20
14266 USDJPY 20030509 17:00:00 117.19 117.19 117.26 117.19
14267 USDJPY 20030509 18:00:00 117.18 117.17 117.26 117.20
14268 USDJPY 20030509 19:00:00 117.22 117.17 117.25 117.19
14269 USDJPY 20030509 20:00:00 117.18 117.17 117.24 117.22
14270 USDJPY 20030509 21:00:00 117.23 117.18 117.25 117.18
The question is quite badly formulated but if I understand it correctly it would mean doing something like that:
Or in the example you give you can also do