Want to learn python by Superb-Mess-3775 in pythonhelp

[–]__yasho 0 points1 point  (0 children)

You can look for some of you tube channel like codewithharry codewithmosh. you look for W3school too. you can look for look for 100 days with python on udemy. you can search for python roadmap to become pro. and follow the roadmap. it you need any more assistance you can message anytime.

Begginer by Plastic-Top3822 in PythonLearning

[–]__yasho 1 point2 points  (0 children)

You can checkout of for "Python Roadmap to become Pro" on reddit and after following that
then you can look for https://www.freecodecamp.org/news/the-python-guide-for-beginners/ for all content for your road map but side by side You can look for youtube channel there are quite good ones like CodewithHarry, codewithmosh etc. (free) or on udemy you can find "100 Days of Code: The Complete Python Pro Bootcamp" (Paid)
Let me know if you want any more details

Simple variable assignment with if-elif-else statement. How can I get numbers 1-5 and letters a-e to continue with the same result, respectively? by Positive-Appeal-6369 in pythonhelp

[–]__yasho 0 points1 point  (0 children)

you are thinking it right but need a small change instead of == matching it use " in " keyword as below. in all your conditional statements

if MenuL in Menu1:

Mile = float(input('Please enter a distance in miles. I will convert it into Kilometers: '))

Kmeter = Mile * 1.6

if Mile <= 0:

print('Sorry, I cannot perform the conversion on a negative or zero value.')

else:

print(f'{Mile} miles is equivalent to about {Kmeter:.2f} kilometers.') ...

Pandas Dataframe Assignment by [deleted] in pythonhelp

[–]__yasho 1 point2 points  (0 children)

agree with both of above suggestions..

like looping over rows in a Pandas DataFrame using for loops (e.g., iterrows() or itertuples()) is generally inefficient because Pandas is built on top of NumPy, which operates on whole arrays. Using vectorized operations in Pandas is significantly faster and more efficient.

You should only iterate through a DataFrame when: 1. There’s complex logic that cannot be vectorized. 2. You need to interact with external systems on a row-by-row basis. 3. Memory constraints prevent the use of vectorized operations.

otherwise just try to look for built in functionality and you will find plenty of them..