DFS wrote:
> Typical cases:
> lines = [('one\ntwo\nthree\n')]
> print(str(lines[0]).splitlines())
> ['one', 'two', 'three']
>
> lines = [('one two three\n')]
> print(str(lines[0]).split())
> ['one',
On 9/4/2021 5:55 PM, DFS wrote:
Typical cases:
lines = [('one\ntwo\nthree\n')]
print(str(lines[0]).splitlines())
['one', 'two', 'three']
lines = [('one two three\n')]
print(str(lines[0]).split())
['one', 'two',
Typical cases:
lines = [('one\ntwo\nthree\n')]
print(str(lines[0]).splitlines())
['one', 'two', 'three']
lines = [('one two three\n')]
print(str(lines[0]).split())
['one', 'two', 'three']
That's the resu
):
> resultList = re.split(r'(\d*)', self.number)
> if platform.python_version() == '3.6.8':
> self.assertEqual(resultList,['', '123', ''])
>
> else:
> self.assertEqual(resultList,['', '123'
g note in the
docs for re.split:
Changed in version 3.7: Added support of splitting on a pattern that
could match an empty string.
(your pattern can match an empty string, so I suppose it wasn't
technically supported in 3.6?)
-- Thomas
I feel that this is clearly not in line with the
#x27;3.6.8':
self.assertEqual(resultList,['', '123', ''])
else:
self.assertEqual(resultList,['', '123', '', '', ''])
I feel that this is clearly not in line with the description of the
function in
On Wed, Aug 19, 2020 at 1:43 PM J Conrado wrote:
>
>
> Hi,
>
>
> I'm satarting using Pandas to read excel. I have a meteorological
> synoptic data and I have for date:
>
>
> 0 2017-11-01 00:00:00
> 1 2017-11-01 03:00:00
> 2 2017-11-01 06:00:00
> 3 2017-11-01 09:00:00
> 4 2017-11-01 12:0
what you want?
FootNote:
If money does not grow on trees, then why do banks have branches?
-Original Message-
From: Python-list On Behalf
Of Brian Oney via Python-list
Sent: Wednesday, August 19, 2020 2:01 PM
To: python-list@python.org
Subject: Re: Python Pandas split Date in day month
> I would like know how can I get for this array the values for day, month
> and hour:
>
> 2017-11-01 03:00:00 year = 2017 month = 11day = 1and
> hour = 3
Pandas has a datetime type. You should probably be using it. It's been
awhile (a year at least), but if your datetime co
On August 19, 2020 7:32:45 PM GMT+02:00, J Conrado
wrote:
>
>
>Hi,
>
>
>I'm satarting using Pandas to read excel. I have a meteorological
>synoptic data and I have for date:
>
>
>0 2017-11-01 00:00:00
>1 2017-11-01 03:00:00
>2 2017-11-01 06:00:00
>3 2017-11-01 09:00:00
>4 2017-11-01
Hi,
I'm satarting using Pandas to read excel. I have a meteorological
synoptic data and I have for date:
0 2017-11-01 00:00:00
1 2017-11-01 03:00:00
2 2017-11-01 06:00:00
3 2017-11-01 09:00:00
4 2017-11-01 12:00:00
.. ...
229 2017-11-30 09:00:00
230 2017-11-30 12
d by saying that two delimiters can't
overlap, which is the usual rule. A reasonable interpretation of "not
overlapping" might well exclude having more the one delimiter in the
same place.
The delimiters wouldn't be overlapping, they'd be adjacent, but it does
seem reasonable
Danilo Coccia writes:
> Il 18/07/2019 12:27, Ben Bacarisse ha scritto:
>> Irv Kalb writes:
>>
>>> I have always thought that split and join are opposite functions. For
>>> example, you can use a comma as a delimiter:
>>>
>>>>>> m
Il 18/07/2019 12:27, Ben Bacarisse ha scritto:
> Irv Kalb writes:
>
>> I have always thought that split and join are opposite functions. For
>> example, you can use a comma as a delimiter:
>>
>>>>> myList = ['a', 'b', 'c',
ery special
> delimiter because every string that gets joined using it includes it!
> It's a wild version of ','.join(['a', 'b,c', 'd']).split(',').
>
> Of course str.split('') could be defined to work the way you expect, but
Irv Kalb writes:
> I have always thought that split and join are opposite functions. For
> example, you can use a comma as a delimiter:
>
>>>> myList = ['a', 'b', 'c', 'd', 'e']
>>>> myString = ','
ature. +1.
Not only that, it makes the language more symmetric/consistent. Put
me down for +1 as well.
Since the fix in the re module in Python 3.7, it can split on an empty
string:
>>> import re
>>> re.split('', 'abc')
['', 'a',
On 7/17/19 4:24 PM, Chris Angelico wrote:
> Agreed. There are a number of other languages where splitting on an
> empty delimiter simply fractures the string into characters (I checked
> Pike, JavaScript, Tcl, and Ruby), and it's a practical and useful
> feature. +1.
Not only that, it makes the la
On Thu, Jul 18, 2019 at 7:06 AM Irv Kalb wrote:
> If I join the list with the empty string as the delimiter:
>
> >>> myList = ['a', 'b', 'c', 'd']
> >>> myString = ''.join(myList)
> >>> print(myString)
I have always thought that split and join are opposite functions. For example,
you can use a comma as a delimiter:
>>> myList = ['a', 'b', 'c', 'd', 'e']
>>> myString = ','.join(myList)
>>> print(myString
es leading "#"
>> return (c for c in consultants if c.strip("0123456789"))
filters out the digit-only values.
>> def explode_column(df, column, split):
>> for _index, row in df.iterrows():
iterates over the rows of the data frame
>>
onsultants(consultants):
> consultants = (c.lstrip("#") for c in consultants.split(";"))
> return (c for c in consultants if c.strip("0123456789"))
>
> def explode_column(df, column, split):
> for _index, row in df.iterrows():
>
ted_tasks.to_excel("filtered_logs.xlsx")
>
> This leaves me with a set of several columns. The main column of concern
> for this example is a consultant
>
> Session date Consultant
> 2019-06-21 11:15:00 WNEWSKI, Joan;#17226;#BALIN,
Jock;#18139;#DUNE,
> Colem;#1
Update.
Option 1. - This annihilates all text in the column leaving nothing.
completed_tasks['Consultant'] =
completed_tasks['Consultant'].str.rstrip('.#123')
Option 2. - returns unhashable series list.
output =
completed_tasks[completed_tasks['Consultant']].str.contains(r'/\b[^\d\W]+\b/g')
.html
>
> --
> Regards =dn
I have managed to split but not filter the numbers. All other code being the
same.
...
completed_tasks = df.loc[(df['Completed'] == 'Yes') & (df['Motor/Property'] ==
'Motor') & (df['Delivery Method'] ==
dateConsultant
2019-06-21 11:15:00 WNEWSKI, Joan;#17226;#BALIN, Jock;#18139;#DUNE,
Colem;#17230;
How can I split the consultant column, keep only names and drop the numbers and
for every session date create a line with data and consultants name?
NB. There are varied amounts of consultants so
x27;] == 'Yes') & (df['Motor/Property'] ==
'Motor') & (df['Delivery Method'] == 'Group Coaching')]
print(completed_tasks.head(n=5))
completed_tasks.to_excel("filtered_logs.xlsx")
This leaves me with a set of several columns. The main
> 27.1019 26.9223 26.7426 26.5630 26.3834 26.2037 26.0241
> 25.8445 25.6649 25.4852 25.3056 25.1260 24.9463 24.7667 24.5871
> 24.4075 24.2278 24.0482 -0.2616 -0.3215 -0.3813 -0.4412\n']
>
> Can anyone help me split as a float array?
7.1019 26.9223 26.7426 26.5630 26.3834 26.2037
> 26.0241 25.8445 25.6649 25.4852 25.3056 25.1260 24.9463
> 24.7667 24.5871 24.4075 24.2278 24.0482 -0.2616 -0.3215
> -0.3813 -0.4412\n']
>
> Can anyone help me split as a float array?
>
.4852 25.3056 25.1260 24.9463 24.7667 24.5871 24.4075
24.2278 24.0482 -0.2616 -0.3215 -0.3813 -0.4412\n']
Can anyone help me split as a float array?
Thanks in advance
--
https://mail.python.org/mailman/listinfo/python-list
I need to split a project into 2 parts. To have one part as the main
project and include the second one as a submodule. Those parts located at
different parts of a project.
I can see 2 ways how I can do that:
1. Use PyCharm Refactor->Move functionality. It works fine. It takes a
module o
Thanks
On Tue, Dec 27, 2016 at 2:57 AM, gst wrote:
> Le lundi 26 décembre 2016 10:34:48 UTC-5, Alec Taylor a écrit :
> > So I'm putting .info in one StringIO and .error in another StringIO.
> >
> > How do I stop them from both being put into both?
> >
> > Code: http://ideone.com/Nj6Asz
>
>
> Hi,
Le lundi 26 décembre 2016 10:34:48 UTC-5, Alec Taylor a écrit :
> So I'm putting .info in one StringIO and .error in another StringIO.
>
> How do I stop them from both being put into both?
>
> Code: http://ideone.com/Nj6Asz
Hi,
it's doable with filter on the handlers:
def exact_filter(level)
So I'm putting .info in one StringIO and .error in another StringIO.
How do I stop them from both being put into both?
Code: http://ideone.com/Nj6Asz
--
https://mail.python.org/mailman/listinfo/python-list
handa...@gmail.com wrote:
> I am trying to split a specific column of csv into multiple column and
> then appending the split values at the end of each row.
>
> `enter code here`
>
> import csv
> fOpen1=open('Meta_D1.tx
Add some print statements to see what is happening, especially after the for
elem in mylist1: statement
--
https://mail.python.org/mailman/listinfo/python-list
I am trying to split a specific column of csv into multiple column and then
appending the split values at the end of each row.
`enter code here`
import csv
fOpen1=open('Meta_D1.txt')
reader=csv.reader(fOpen1)
mylist=[elem[1].split(
On 10/16/2016 05:25 AM, k.adema...@gmail.com wrote:
> Help me!, I would like to find split where the split sums are close
> to each other?
>
> I have a list is
>
> test = [10,20,30,40,50,60,70,80,90,100]
>
> and I would like to find split where the split sums are
On Sunday, October 16, 2016 at 12:27:00 PM UTC+1, k.ade...@gmail.com wrote:
> Help me!, I would like to find split where the split sums are close to each
> other?
>
> I have a list is
>
> test = [10,20,30,40,50,60,70,80,90,100]
>
> and I would like to find split where
Help me!, I would like to find split where the split sums are close to each
other?
I have a list is
test = [10,20,30,40,50,60,70,80,90,100]
and I would like to find split where the split sums are close to each other by
number of splits = 3 that all possible combinations and select the split
https://social.msdn.microsoft.com/Forums/vstudio/en-US/5f0a9a51-a256-4671-a5fc-e213949e7204/how-to-refactor-3-nested-for-loop-into-smaller-for-loop-assume-each-of-them-independent?forum=csharpgeneral
I wrote a algorithm to split for loop to generate maplesoft code for limited
memory
Assume I
On Mon, 12 Sep 2016 14:30:32 +, Grant Edwards wrote:
> On 2016-09-12, jmp wrote:
>> On 09/11/2016 02:12 PM, Chris Angelico wrote:
>>> On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola
>>> wrote:
> I have worked places where they put stuff like this at the bottom of
> emails sent to the
On 2016-09-12, jmp wrote:
> On 09/11/2016 02:12 PM, Chris Angelico wrote:
>> On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola
>> wrote:
I have worked places where they put stuff like this at the bottom of
emails sent to the person sitting next to them :) -raising entropy-ly yrs-
Ro
On Tue, Sep 13, 2016 at 12:00 AM, jmp wrote:
> On 09/11/2016 02:12 PM, Chris Angelico wrote:
>>
>> On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola
>> wrote:
I have worked places where they put stuff like this at the bottom of
emails sent to the person sitting next to them :) -raisin
On 09/11/2016 02:12 PM, Chris Angelico wrote:
On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola
wrote:
I have worked places where they put stuff like this at the bottom of emails
sent to the person sitting next to them :) -raising entropy-ly yrs- Robin Becker
Cannot do anything about it. It is
On 2016-09-08 09:27:20 +, Joaquin Alzola said:
Cannot do anything about it. It is not on my MTA client and it is added
by the company server :(
If it depended on my I will remove it but I can not do that.
This email is confidential and may be subject to privilege. If you are
not the inten
On Thu, Sep 8, 2016 at 7:27 PM, Joaquin Alzola
wrote:
>>I have worked places where they put stuff like this at the bottom of emails
>>sent to the person sitting next to them :) -raising entropy-ly yrs- Robin
>>Becker
>
> Cannot do anything about it. It is not on my MTA client and it is added by
>I have worked places where they put stuff like this at the bottom of emails
>sent to the person sitting next to them :) -raising entropy-ly yrs- Robin
>Becker
Cannot do anything about it. It is not on my MTA client and it is added by the
company server :(
If it depended on my I will remove i
On Fri, 9 Sep 2016 08:13 am, Grant Edwards wrote:
> After all, that boilerplate just makes the corporation look stupid and
> incompetent.
I wish that were true.
Unfortunately, in the corporate world, it *doesn't* make them look stupid
and incompetent. It makes them look conventional, careful,
On 2016-09-08, Random832 wrote:
> On Thu, Sep 8, 2016, at 18:13, Grant Edwards wrote:
>> After all, that boilerplate just makes the corporation look stupid and
>> incompetent. Any email that leaves the corporate network must be
>> assumed to be visible to world+dog. Anybody who thinks differentl
On Thu, 08 Sep 2016 18:27:44 -0400
Random832 wrote:
> If every lawyer in the world benefits from the interpretation that
> this sort of notice is legally effective (since tomorrow it may be
> they who accidentaly send privileged information), who will argue in
> court that it's not? The reality is
On Fri, 9 Sep 2016 04:59 pm, Rustom Mody wrote:
> On Friday, September 9, 2016 at 2:37:48 AM UTC+5:30, Ben Finney wrote:
>> Joaquin Alzola writes:
>> > Added by the MTA of the company not by my client.
>>
>> Right. So, here are things you can do (that we cannot) about this:
>> * Switch to a diffe
On Fri, Sep 9, 2016 at 4:20 PM, Rustom Mody wrote:
> [Personal note: When I was a kid I thought that doctors removed fever by
> sticking
> a thermometer into one’s mouth.
> Those who teach that programming needs to start with writing print statements
> are the same except for not having the excus
On Friday, September 9, 2016 at 2:37:48 AM UTC+5:30, Ben Finney wrote:
> Joaquin Alzola writes:
> > Added by the MTA of the company not by my client.
>
> Right. So, here are things you can do (that we cannot) about this:
> * Switch to a different mail service, one which does not add that
> nonse
On Friday, September 9, 2016 at 11:51:25 AM UTC+5:30, Rustom Mody wrote:
> And if the original 'a' looked something like
> >>> a="p:1,q:2,r:42"
>
> then you probably want something like:
>
> >>> {k:v for item in a.split(',') for k,v in [item.split(':')]}
> {'q': '2', 'p': '1', 'r': '42'}
> >>>
W
On Friday, September 9, 2016 at 1:36:24 AM UTC+5:30, Larry Hudson wrote:
> On 09/08/2016 07:57 AM, John Gordon wrote:
> > In Joaquin Alzola writes:
> >
> >> Use the split
> >
> >> a.split(",")
> >> for x in a:
> >> print(x)
>
Grant Edwards writes:
> On 2016-09-08, Joaquin Alzola wrote:
>
>> Basically what all comes down is to complain. I wonder if in a
>> company of 80,000 people I will manage to change that behaviour.
>
> Perhaps others have complained. If enough people complain, maybe
> they'll do something.
>
> Aft
On Fri, Sep 9, 2016 at 11:05 AM, Dennis Lee Bieber
wrote:
> I suspect, like the last two companies I've worked for -- corporate IT
> policy is to block any access to non-corporate email systems. (Heck, my
> current company is so paranoid that it adds "EXT:" to the subject of
> incoming ema
On Thu, Sep 8, 2016, at 18:13, Grant Edwards wrote:
> After all, that boilerplate just makes the corporation look stupid and
> incompetent. Any email that leaves the corporate network must be
> assumed to be visible to world+dog. Anybody who thinks differently is
> deluded and should not be allow
On 2016-09-08, Joaquin Alzola wrote:
> Basically what all comes down is to complain. I wonder if in a
> company of 80,000 people I will manage to change that behaviour.
Perhaps others have complained. If enough people complain, maybe
they'll do something.
After all, that boilerplate just makes
On Thursday September 8 2016 17:17, in comp.lang.python, "Joaquin Alzola"
wrote:
> Hi Ben
>
> Thanks for the advice.
>
>> * Complain
>
> Basically what all comes down is to complain. I wonder if in a company of
> 80,000 people I will manage to change that behaviour.
Why don't you, at least, i
On Fri, Sep 9, 2016 at 7:17 AM, Joaquin Alzola
wrote:
> Hi Ben
>
> Thanks for the advice.
>
>> * Complain
>
> Basically what all comes down is to complain. I wonder if in a company of
> 80,000 people I will manage to change that behaviour.
> This email is confidential and may be subject to privil
Hi Ben
Thanks for the advice.
> * Complain
Basically what all comes down is to complain. I wonder if in a company of
80,000 people I will manage to change that behaviour.
This email is confidential and may be subject to privilege. If you are not the
intended recipient, please do not copy or di
Joaquin Alzola writes:
> world?
>
> Cannot do anything.
That's not true; you can do more than we.
> Added by the MTA of the company not by my client.
Right. So, here are things you can do (that we cannot) about this:
* Complain, with reasoned explanation, to the management responsible for
https://mail.python.org/mailman/listinfo/python-list
On 09/08/2016 07:57 AM, John Gordon wrote:
In Joaquin Alzola
writes:
Use the split
a.split(",")
for x in a:
print(x)
This won't work. split() returns a list of split elements but the
original string remains unchanged.
You want something like this instead:
ne
In Joaquin Alzola
writes:
> Use the split
> a.split(",")
> for x in a:
> print(x)
This won't work. split() returns a list of split elements but the
original string remains unchanged.
You want something like this instead:
newlist = a.split(",")
On 08/09/2016 03:54, D'Arcy J.M. Cain wrote:
On Wed, 7 Sep 2016 16:04:40 +
Joaquin Alzola wrote:
..
This email is confidential and may be subject to privilege. If you
are not the intended recipient, please do not copy or disclose its
content but contact the sender immediately upon
On Wed, 7 Sep 2016 16:04:40 +
Joaquin Alzola wrote:
> > where is a comma there should start new line ... How can i do it ?
>
> Use the split
>
> a.split(",")
> for x in a:
> print(x)
Seems overly complex.
print(a.replace(',', '\n'
> where is a comma there should start new line ... How can i do it ?
Use the split
a.split(",")
for x in a:
print(x)
This email is confidential and may be subject to privilege. If you are not the
intended recipient, please do not copy or disclose its content but contact the
sende
On Wed, 7 Sep 2016 08:51:36 -0700 (PDT), Asad ur Rehman wrote:
[snip]
> sofia/external/1203632525,CS_EXECUTE,
> Outbound Call,
> 12036325259,
> ,12036325259,
> ,
> ,ACTIVE,
> 9047125683,
> 9047125683,
> RECV,
> 75a9d3ee-7511-11e6-a115-89a1f4981d2c,
> vb-pmedia,7841c6c0-7511-11e6
Here is my view.py
import os.path
import commands
def call_report(request):
a = commands.getstatusoutput('/usr/local/freeswitch/bin/fs_cli -x "show
calls"')
return HttpResponse(a)
When i run this command it gives output which you can see...
0uuid,direction,created,created_epoch,nam
DFS writes:
> Have:
> '584323 Fri 13 May 2016 17:37:01 - (UTC) 584324 Fri 13 May 2016
> 13:44:40 -0400 584325 13 May 2016 17:45:25 GMT 584326 Fri 13 May 2016
> 13:47:28 -0400'
>
> Want:
> [('584323', 'Fri 13 May 2016 17:37:01 - (UTC)'),
> ('584324', 'Fri 13 May 2016 13:44:40 -0400'),
>
;),
>('584324', 'Fri 13 May 2016 13:44:40 -0400'),
>('584325', '13 May 2016 17:45:25 GMT'),
>('584326', 'Fri 13 May 2016 13:47:28 -0400')]
>
>
> Or maybe split() on space, then run through and add words of 6+ numb
On 2/9/2016 10:50 PM, Cameron Simpson wrote:
On 10Feb2016 07:34, srinivas devaki wrote:
PS: trying to read mailing list when you are half woke, is a bad idea and
trying reply to it is even bad idea.
Regrettably, when one is half awake one is unable to realise what a bad
idea it may be:-)
On 10Feb2016 07:34, srinivas devaki wrote:
On Feb 10, 2016 7:23 AM, "srinivas devaki"
wrote:
On Feb 10, 2016 6:56 AM, "Anthony Papillion"
wrote:
> I am using datetime.now() to create a unique version of a filename.
> When the final file is named, it will look something like:
> myfile-2015-0
On Feb 10, 2016 7:23 AM, "srinivas devaki"
wrote:
>
>
> On Feb 10, 2016 6:56 AM, "Anthony Papillion"
wrote:
> >
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA512
> >
> > Hello Everyone,
> >
> > I am using datetime.now() to create a unique version of a filename.
> > When the final file is na
On Tue, Feb 9, 2016 at 5:58 PM, Anthony Papillion
wrote:
>
> On 02/09/2016 07:47 PM, Ben Finney wrote:
> > Anthony Papillion writes:
> >
> >> On 02/09/2016 07:26 PM, Anthony Papillion wrote:
> >>> I am using datetime.now() to create a unique version of a filename.
> >>> […]
> >>
> >> Found the so
On 2016-02-09 19:26, Anthony Papillion wrote:
> myfile-2015-02-09-19-08-45-4223
>
> Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by
> datetime.now() with "-"'s. I'm doing that using the following code
> but it's freaking ugly and I KNOW there is a better way to do it. I
> just
On 02/09/2016 07:47 PM, Ben Finney wrote:
> Anthony Papillion writes:
>
>> On 02/09/2016 07:26 PM, Anthony Papillion wrote:
>>> I am using datetime.now() to create a unique version of a filename.
>>> […]
>>
>> Found the solution in strftime(). Exactly what I was looking for.
>
> For the task of
On Feb 10, 2016 6:56 AM, "Anthony Papillion"
wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> Hello Everyone,
>
> I am using datetime.now() to create a unique version of a filename.
> When the final file is named, it will look something like:
>
> myfile-2015-02-09-19-08-45-4223
>
Anthony Papillion writes:
> On 02/09/2016 07:26 PM, Anthony Papillion wrote:
> > I am using datetime.now() to create a unique version of a filename.
> > […]
>
> Found the solution in strftime(). Exactly what I was looking for.
For the task of making a unique filename, you should also consider th
On 10 February 2016 at 01:26, Anthony Papillion wrote:
> I am using datetime.now() to create a unique version of a filename.
> When the final file is named, it will look something like:
>
> myfile-2015-02-09-19-08-45-4223
>
> Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by
> da
On 02/09/2016 07:26 PM, Anthony Papillion wrote:
> Hello Everyone,
>
> I am using datetime.now() to create a unique version of a filename.
> When the final file is named, it will look something like:
>
> myfile-2015-02-09-19-08-45-4223
>
> Notice I'm replacing all of the "."'s, " "'s, and ":"'s
On Wed, Feb 10, 2016 at 12:26 PM, Anthony Papillion
wrote:
> I am using datetime.now() to create a unique version of a filename.
First off, be aware that this won't make a unique file name. But if
you're okay with that (deal with collisions somehow), then sure.
> When the final file is named, it
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Hello Everyone,
I am using datetime.now() to create a unique version of a filename.
When the final file is named, it will look something like:
myfile-2015-02-09-19-08-45-4223
Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by
date
On 05/12/15 20:27, Mark Lawrence wrote:
On 05/12/2015 19:51, Robert wrote:
On Saturday, December 5, 2015 at 2:29:28 PM UTC-5, Peter Pearson wrote:
On Wed, 2 Dec 2015 14:44:30 -0600, Ian Kelly
wrote:
On Wed, Dec 2, 2015 at 2:37 PM, Robert wrote:
[snip]
ss0="1, 2, 4, 8, 16&q
On 05/12/2015 19:51, Robert wrote:
On Saturday, December 5, 2015 at 2:29:28 PM UTC-5, Peter Pearson wrote:
On Wed, 2 Dec 2015 14:44:30 -0600, Ian Kelly wrote:
On Wed, Dec 2, 2015 at 2:37 PM, Robert wrote:
[snip]
ss0="1, 2, 4, 8, 16".split(", ")
[snip]
Try help(str.spl
On Saturday, December 5, 2015 at 2:29:28 PM UTC-5, Peter Pearson wrote:
> On Wed, 2 Dec 2015 14:44:30 -0600, Ian Kelly wrote:
> > On Wed, Dec 2, 2015 at 2:37 PM, Robert wrote:
> [snip]
> >> ss0="1, 2, 4, 8, 16".split(", ")
> [snip]
> > Try help(
On Wed, 2 Dec 2015 14:44:30 -0600, Ian Kelly wrote:
> On Wed, Dec 2, 2015 at 2:37 PM, Robert wrote:
[snip]
>> ss0="1, 2, 4, 8, 16".split(", ")
[snip]
> Try help(str.split)
Or if, like me, you can't remember the magic word "str", ask:
help("
On Wednesday, December 2, 2015 at 3:45:34 PM UTC-5, Ian wrote:
> On Wed, Dec 2, 2015 at 2:37 PM, Robert wrote:
> > Hi,
> >
> > I learn split method online. When I try to run the line with ss1 beginning,
> > I don't understand why its output of ss1 and ss2. I hav
On Wed, Dec 2, 2015 at 2:37 PM, Robert wrote:
> Hi,
>
> I learn split method online. When I try to run the line with ss1 beginning,
> I don't understand why its output of ss1 and ss2. I have check the help
> about split. It looks like that it is a numpy method.
> W
Hi,
I learn split method online. When I try to run the line with ss1 beginning,
I don't understand why its output of ss1 and ss2. I have check the help
about split. It looks like that it is a numpy method.
What is the split method parameter (within " ") for?
Thanks,
...
14 computedshopcartdb:103.5% 0 30|0 0|119m97m
> > 1538 ComputedCartRS PRI 09:40:26
> >
> > I'd like to split this line on multiple separators - in this case,
> > consecutive whitespace, as well as the pipe symbol (|).
>
> Correct me if I'
103.5% 0 30|0 0|119m97m
>> 1538 ComputedCartRS PRI 09:40:26
>>
>> I'd like to split this line on multiple separators - in this case,
>> consecutive whitespace, as well as the pipe symbol (|).
>
> Correct me if I'm misanalyzing t
9:40:26
>
> I'd like to split this line on multiple separators - in this case,
> consecutive whitespace, as well as the pipe symbol (|).
Correct me if I'm misanalyzing this, but it sounds to me like a simple
transform-then-split would do the job:
f.replace("|"," &
On 2015-07-28 15:09, Victor Hooi wrote:
On Tuesday, 28 July 2015 23:59:11 UTC+10, m wrote:
W dniu 28.07.2015 o 15:55, Victor Hooi pisze:
> I know the regex library also has a split, unfortunately, that does not
collapse consecutive whitespace:
>
> In [19]: re.split(' |', f
>
> I'd like to split this line on multiple separators - in this case,
> consecutive whitespace, as well as the pipe symbol (|).
>
Is this what you want:
In [5]: def split(s):
...: elements = []
...: for x in s.split(): # Split whitespace
...:
On Tuesday, 28 July 2015 23:59:11 UTC+10, m wrote:
> W dniu 28.07.2015 o 15:55, Victor Hooi pisze:
> > I know the regex library also has a split, unfortunately, that does not
> > collapse consecutive whitespace:
> >
> > In [19]: re.split(' |', f)
>
>
I have a line that looks like this:
14 *0330 *0 760 411|0 0 770g 1544g 117g 1414
computedshopcartdb:103.5% 0 30|0 0|119m97m 1538
ComputedCartRS PRI 09:40:26
I'd like to split this line on multiple separators - in this
1 - 100 of 885 matches
Mail list logo