Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
3k views

Select value based on condition on dataframe

I have some data in data frame and would like to return a value based on specific conditions. It is highly time consuming. I tried three methods: Method 1: Without dataframe, this is the simple ...
Praveen Gupta Sanka's user avatar
4 votes
4 answers
14k views

Checking whether a list is sorted, ascending or descending

What is the best way to conditionally use an operator? All 3 methods seemed acceptable to me, and the last 2 better. If you're curious: I've got a list which is unsorted, and many other lists which ...
12345678910111213's user avatar
2 votes
1 answer
104 views

Conditional statements with doctor and patient information

I'm focusing on trying to write clean, modular Python 2.7.5 code. ...
John Smith's user avatar
10 votes
3 answers
970 views

Displaying information about people from a JSON file

I'm working with Python 2.7.5 and I have written the following code: ...
user2421117's user avatar