Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi guys,
Having trouble to find a solution for this. When run a Python query in my normal IDE i get the proper result:
Well Name | Phase | Value | UNIVERSITY 20 PW 2502H | INT | 52.75
TIGER 55-2-12 LOV 8H | MNH | 58.25
UNIVERSITY 20 TG UNIT | SRF | 25.50
but in PBI i am getting just:
52.75
58.25
25.50
Without the index in my first picture. using the following code, do you know how i can get my normal answer with all index?
condition1 = df[df['Actual Operation']=='DRL']
condition1=pd.DataFrame(condition1.groupby(by=['Well Name', 'Phase'])['Sum of Activity Time (Hr)'].sum())
condition1=condition1[condition1.isin(condition1.groupby(['Phase']).min()['Sum of Activity Time (Hr)'].tolist())].dropna()
Thanks
Solved! Go to Solution.
@Anonymous ,
If you modify the last line like below, will the output be a table, not just a column?
condition1=condition1.isin(condition1.groupby(['Phase']).min()['Sum of Activity Time (Hr)'].tolist())
If this issue persists, please share sample data and complete python code.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
If you modify the last line like below, will the output be a table, not just a column?
condition1=condition1.isin(condition1.groupby(['Phase']).min()['Sum of Activity Time (Hr)'].tolist())
If this issue persists, please share sample data and complete python code.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |