↧
Answer by quasi-human for Pandas dataframe, get the row and index for a...
You can also use a np.where method as follows:import numpy as npempty_status_idx = np.where(df.Status.isnull())[0].tolist()[0, 2]
View ArticleAnswer by sophocles for Pandas dataframe, get the row and index for a column...
You are overcomplicating it:empty_status_idx = df[df['Status'].isnull()].index.tolist()Out[65]: [0, 2]
View ArticlePandas dataframe, get the row and index for a column meeting certain conditions
I have the below df:import pandas as pdimport numpy as npoutput = [['Owner', 'Database', 'Schema', 'Table', 'Column', 'Comment', 'Status'], ['', 'DEV', 'AIRFLOW', 'TASK_INSTANCE', '_LOAD_DATETIME',...
View Article
More Pages to Explore .....