Avatar ·

How to remove lines according to different conditions?

📁 Advanced Python Topics, numpy, pandas

There is a data frame and I need to delete lines from it in which the value of the column a is more than 50. This operation is successfully performed by the code:

import pandas as pd
import numpy as np

df = pd.DataFrame([[256, 4, 24, 51], [24, 25, 34, 200], [300, 12, 45, 11], [34, ...