Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: WinPython 3.8.2.0 not woking out of the box.
Post: RE: WinPython 3.8.2.0 not woking out of the box.

(Jul-03-2020, 02:10 AM)hsazerty2 Wrote: Hi there, I am new to python :) I just installed WinPython64-3.8.2.0 on my laptop, but nothing seem to work !! See below when i run python.exe (or jupyter no...
ilcaa72 General Coding Help 2 2,463 Nov-06-2020, 09:08 AM
    Thread: Dataframe replace
Post: Dataframe replace

i have a dataframe that has rows like. i want to get rid of various markings like =, |, () i wrote this but it returns the same value without removing ['2 team name = 27.92 4 0 0 20...
ilcaa72 Data Science 0 1,496 Oct-07-2019, 03:19 PM
    Thread: drop row index , how to show new df
Post: drop row index , how to show new df

hi, i have data i downloaded from the internet so it is not in a structured table, there are rows i want to delete. using a regex, i am able to identify the rows but dropping them from the dataframe a...
ilcaa72 General Coding Help 0 927 Oct-07-2019, 01:40 PM
    Thread: delete rows with empty strings in Series
Post: delete rows with empty strings in Series

i have a series (column) from a DataFrame that contains empty strings, ''. i want to delete each element that is empty so this should only contain values with 'Sea' . The data is actually a panda col...
ilcaa72 Data Science 1 11,151 Oct-04-2019, 05:03 PM
    Thread: error using 'continue' in my code
Post: error using 'continue' in my code

i get the error "continue not properly in loop". i cant find examples that dont use it like this... i want the code to exit and 're-enter' the loop when it encounters 'continue', if you notice before...
ilcaa72 General Coding Help 1 2,025 Jun-05-2019, 07:24 PM
    Thread: proper syntax for itertuples?
Post: proper syntax for itertuples?

i have this code the keeps giving me errors. i cant seem to get the correct syntax, can anyone assist? below is the dataframe and error is: TypeError: tuple indices must be integers or slices, not st...
ilcaa72 General Coding Help 1 1,970 Jun-05-2019, 04:15 PM
    Thread: read_csv error
Post: RE: read_csv error

thanks i ended up adding the r prefix to the string and made it a "raw string" it worked filename = r"C:\Users\MTS\Downloads\SPY.csv"
ilcaa72 General Coding Help 2 3,108 May-29-2019, 02:58 PM
    Thread: read_csv error
Post: read_csv error

here is my statement, and the error, the directory is correct, can you explian the issue? thanks import pandas as pd file = "C:\Users\MTS\Downloads\SPY.csv" spy = pd.read_csv(file) spy.head()Quote:...
ilcaa72 General Coding Help 2 3,108 May-29-2019, 02:27 PM
    Thread: why import time 2x
Post: RE: why import time 2x

thanks, now line 3 makes sense, its actually a different library so once you import the library (import datetime) you dont need to import the individual objects? (im i wording this correctly?) why d...
ilcaa72 General Coding Help 4 2,663 Apr-16-2019, 06:09 PM
    Thread: why import time 2x
Post: why import time 2x

just need a quick explanation on why if i imported time from datetime in line 2, do i need to import again in line 3 to make this work? ctime wont appear if i dont import time on its own line... as a...
ilcaa72 General Coding Help 4 2,663 Apr-16-2019, 04:18 PM
    Thread: test if variable is Numeric?
Post: RE: test if variable is Numeric?

var = 5 print(var.isnumeric()) returns an error, i was expecting TRUE
ilcaa72 General Coding Help 12 10,118 May-25-2018, 01:18 AM
    Thread: test if variable is Numeric?
Post: test if variable is Numeric?

hi, in Visual Basic i can use IsNumeric() function, returns T/F. How do I test if a variable is an integer in python... using standard library tahnks
ilcaa72 General Coding Help 12 10,118 May-25-2018, 01:08 AM
    Thread: 3 conditions to check and return
Post: RE: 3 conditions to check and return

i added an extra else: after the last condition or matching the original For loop. so if the first 2 dont break the loop this last one will... thanks for the reply
ilcaa72 General Coding Help 3 3,157 May-24-2018, 03:13 AM
    Thread: 3 conditions to check and return
Post: RE: 3 conditions to check and return

are you saying if i make it a func and place return it wont include the last line if a condition is met before? its the last statement or condition it keep printing even if i include the 'break' stat...
ilcaa72 General Coding Help 3 3,157 May-24-2018, 12:53 AM
    Thread: 3 conditions to check and return
Post: 3 conditions to check and return

i want to check/return for 3 conditions, it loops shortest str and finds diff in other 1. if difference is immediate before end of range, return index, exit 2. if string length is same and index loop ...
ilcaa72 General Coding Help 3 3,157 May-24-2018, 12:02 AM
    Thread: How Do I find Index of a character in string?
Post: RE: How Do I find Index of a character in string?

mystr = 'hello zippy'so to find the index value of the second z?
ilcaa72 General Coding Help 5 3,703 May-23-2018, 11:28 PM
    Thread: get the last index number
Post: get the last index number

s = "kitti" 0,1,2,3,4 k,i,t,t,ihow do i retrieve '4', the last index value. i know i can do a len(s)-1, but i assume there is a function that gives me last number of index, or more eloquent way. May...
ilcaa72 General Coding Help 3 3,214 May-23-2018, 09:53 PM
    Thread: How Do I find Index of a character in string?
Post: RE: How Do I find Index of a character in string?

that didnt help at all, only confused me more, didnt see what i was lookiing for. is the question that difficult or long to answer here?
ilcaa72 General Coding Help 5 3,703 May-23-2018, 09:31 PM
    Thread: How Do I find Index of a character in string?
Post: How Do I find Index of a character in string?

how do i find index of each character, myString = "kitti" for char in mystring: print(index of each letter)
ilcaa72 General Coding Help 5 3,703 May-23-2018, 03:24 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020