Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: How to convert what appears to be a JSON file to CSV
Post: How to convert what appears to be a JSON file to C...
Hi,
I have this file below, the format looks like it's JSON but I'm not sure, I want to convert it to csv.
I have also attached the file for clear readability.
Quote:(UserResponse){
UserData = ... |
|
NewBeie |
General Coding Help |
4 |
2,512 |
Aug-28-2020, 09:34 AM |
|
|
Thread: Unknown error occurred: Port not found
Post: Unknown error occurred: Port not found
Hi,
I have this WSDL
http://service.name.co.za:8580/xx/wsco/user/ExtractBCUsersXAPI?WSDLwhen I call it on a SOAPUI I get data back, but when I put it on my Python code I get Output:Unknown error occ... |
|
NewBeie |
General Coding Help |
0 |
1,432 |
Aug-27-2020, 08:50 PM |
|
|
Thread: Dropping rows with missing values
Post: RE: Dropping rows with missing values
(Jul-27-2020, 05:34 AM)scidam Wrote: Are you sure that your data frame elements are nans? The following example shows that everything works fine:
>>> df = pd.DataFrame({'a': [pd.np.nan, 3,... |
|
NewBeie |
General Coding Help |
2 |
2,367 |
Jul-27-2020, 06:29 AM |
|
|
Thread: Dropping rows with missing values
Post: Dropping rows with missing values
Hi,
I have this code below, I'm trying to drop rows with missing values, and I'm trying to use DataFrame.dropna(), But when I test below the rows were not dropped, please help. I have attached my dat... |
|
NewBeie |
General Coding Help |
2 |
2,367 |
Jul-26-2020, 07:46 PM |
|
|
Thread: try: except not returning a value
Post: RE: try: except not returning a value
(Jul-14-2020, 11:24 AM)Yoriz Wrote: Your first findall string does not have a '?' The second one does.
Don't capture every possible exception, capture a specific exception you want to handle.
even w... |
|
NewBeie |
General Coding Help |
6 |
2,719 |
Jul-14-2020, 12:18 PM |
|
|
Thread: try: except not returning a value
Post: try: except not returning a value
I have this function;
def get_file_number(filename):
""" Get the file number from the file name
Finds the part between xml and .txt and converts that to a number"""
try:
file_num... |
|
NewBeie |
General Coding Help |
6 |
2,719 |
Jul-14-2020, 10:35 AM |
|
|
Thread: Regex findall()
Post: Regex findall()
Hi
I have re code with find findall() function. I understand that findall supposed to find a certain match in the given string, but the output that I'm getting suggest something else, I'm getting eve... |
|
NewBeie |
General Coding Help |
2 |
4,288 |
Jul-10-2020, 11:13 AM |
|
|
Thread: Regex Pattern
Post: RE: Regex Pattern
Thank you so much, it's doing the most, however I still get this in my output:Output:image003.jpgimage/[email protected]:37:13truefalseimage004.jpgimage/jpegimage004.... |
|
NewBeie |
General Coding Help |
5 |
3,034 |
May-13-2019, 05:48 AM |
|
|
Thread: Regex Pattern
Post: Regex Pattern
Hi,
I have two patterns in my code, one to remove the first part of the string which is just garbage, the second is to remove extra newlines in the string, but all of them are not working, please hel... |
|
NewBeie |
General Coding Help |
5 |
3,034 |
May-07-2019, 07:44 AM |
|
|
Thread: Read a folder with a multiple files
Post: RE: Function returning elements in a list
The answer above doesn't really help my situation, from the For Loop, I want to read each element in a loop. I could get 2 files or more, so names = read_names()
print(next(names)) # returns John
pri... |
|
NewBeie |
General Coding Help |
7 |
4,271 |
May-06-2019, 08:04 AM |
|
|
Thread: Read a folder with a multiple files
Post: Read a folder with a multiple files
I have a folder with two xml files (They could be more than two). I want to step in that folder and read each file, so I do have this code: path = os.getcwd() + '/XmlFiles/'
files = os.listdir(path)So... |
|
NewBeie |
General Coding Help |
7 |
4,271 |
May-06-2019, 06:54 AM |
|
|
Thread: Read a folder with a multiple files
Post: RE: Function returning elements in a list
I have a folder with two xml files (They could be more than two). I want to step in that folder and read each file, so I have this code: path = os.getcwd() + '/Emails/'
files = os.listdir(path)So now,... |
|
NewBeie |
General Coding Help |
7 |
4,271 |
May-06-2019, 06:48 AM |
|
|
Thread: Read a folder with a multiple files
Post: Function returning elements in a list
Hi,
I have a list Quote:Names = ['John', 'Tom']
if I say def ReadNames():
for name in Names:
print(name)I get both names Quote:John
Tom
How ever when I say def ReadNames():
for n... |
|
NewBeie |
General Coding Help |
7 |
4,271 |
May-03-2019, 11:17 AM |
|
|
Thread: Extract a List element
Post: RE: Extract a List element
What if I want to any number after a word claim that's \d{9}?
(Apr-29-2019, 02:53 PM)DeaD_EyE Wrote: Try this:
r'claim number \d{9}'
\d{9} == exact 9 numbers
To allow a range, you can use a comma... |
|
NewBeie |
General Coding Help |
4 |
2,902 |
May-03-2019, 09:49 AM |
|
|
Thread: Extract a List element
Post: RE: Extract a List element
Thank you, it worked **biggrin**
(Apr-29-2019, 02:53 PM)DeaD_EyE Wrote: Try this:
r'claim number \d{9}'
\d{9} == exact 9 numbers
To allow a range, you can use a comma:
\d{4,9} == 4-9 numbers |
|
NewBeie |
General Coding Help |
4 |
2,902 |
Apr-30-2019, 05:12 AM |
|
|
Thread: Extract a List element
Post: Extract a List element
Hi,
I have this code: cl = re.findall(r'[claim number]+[0-9]+', claim_num_50)It gives me back a list Output:[' 19', ' 0333', ' number 63108316972', ' claim number 193137164', ' 21', ' 871', ' 1291', ... |
|
NewBeie |
General Coding Help |
4 |
2,902 |
Apr-29-2019, 02:19 PM |
|
|
Thread: Interpreting Python Code
Post: RE: Interpreting Python Code
Thank you, I'll go learn slicing, now I know what that is.
(Apr-29-2019, 11:39 AM)ichabod801 Wrote: Let's start with:
clientNo = ClientNumber.split("ClientNo", 1)That takes the string ClientNumber... |
|
NewBeie |
General Coding Help |
3 |
2,262 |
Apr-29-2019, 12:48 PM |
|
|
Thread: Interpreting Python Code
Post: Interpreting Python Code
Hi,
I have this code:
clientNo = ClientNumber.split("ClientNo", 1)[1][0:50]I don't know what does the last [0:50] mean, please help.
From the beginning I understand that we say Quote:split the strin... |
|
NewBeie |
General Coding Help |
3 |
2,262 |
Apr-29-2019, 11:16 AM |
|
|
Thread: Remove Email Signature
Post: RE: Remove Email Signature
Hi,
Thank you for the response, I actually have a pattern already, pattern = re.compile(r'[Kk]ind [Rr]egards|[Vv]riendelike [Gg]roete/|[Vv]riendelike [Gg]roete|[Bb]est [Rr]egards| [Bb]est [Rr]egards|... |
|
NewBeie |
General Coding Help |
4 |
9,326 |
Apr-29-2019, 10:32 AM |
|
|
Thread: Identify two specific words next to each
Post: RE: Identify two specific words next to each
I also have the same problem. |
|
NewBeie |
General Coding Help |
9 |
4,173 |
Apr-26-2019, 07:40 AM |