Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I want to select the rows where the revenue is NaN. So, row 7 and row 43 should be selected. I tried the code (In[117]) shown in the screenshot but it doesn't work for me.
You can use isna
NaN_table[NaN_table.Revenue.isna()]
Just use isnull:
NaN_table[NaN_table['Revenue'].isnull()]
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 days ago.
Improve this question
I have created this scatter graph but want to get the p-value for it: enter image description here
I tried looking at other answers but they all seemed overcomplicated.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have this sample of a data frame showing population over the years.
I want to remove the row labels 'Country Code' altogether and have the next column, 'Country Name', as the row labels instead. How can I do this?
Let me know if you need more information or anything is not clear.
df = df.set_index('Country Name')
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I am getting this error.. code not submitting
need help thanks in advance
I believe your error is in finding the midpoint.
In python, if we use len(lst)/2 it will return float value.
The Index of list cannot be a floating point value.
Change your line to:
midpoint = len(lst)//2
This will return an Integer value as output.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
i want to cut all the columns of Data Frame. When I print the result it show good result, but when I want to assign those values in new data frame it returns NaNs.example of code
You need to paste your code here for understanding proper solution of problem.
you can try to add one line of code:
slc=slc.reset_index(drop=True)
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
List 1:
['buying','maint']
List 2:
[['med', 'vhigh', 'low', 'high'],['med', 'small', 'big']]
Expected_output:
[['buying_med', 'buying_vhigh','buying_low','buying_high'],['maint_med','maint_small','maint_big']]
Please let mw know on how to do this in python 3.
This sounds like a homework problem so I will only give a suggestion to push you in the right direction. Start with trying to implement a solution with 2 for loops. If you want to improve your answer, take a look at list comprehensions.