Re: Combining 2 data series into one

2017-07-01 Thread Bhaskar Dhariyal
017 4:34:56 AM > *To:* python-list@python.org > *Subject:* Re: Combining 2 data series into one > > On Wednesday, 28 June 2017 23:43:57 UTC+5:30, Albert-Jan Roskam wrote: > > (sorry for top posting) > > Yes, I'd try pd.concat([df1, df2]). > > Or this: &g

Re: Combining 2 data series into one

2017-07-01 Thread Albert-Jan Roskam
Dhariyal Sent: Thursday, June 29, 2017 4:34:56 AM To: python-list@python.org Subject: Re: Combining 2 data series into one On Wednesday, 28 June 2017 23:43:57 UTC+5:30, Albert-Jan Roskam wrote: > (sorry for top posting) > Yes, I'd try pd.concat([df1, df2]). > Or this: > df['b

Re: Combining 2 data series into one

2017-06-28 Thread Bhaskar Dhariyal
___ > From: Python-list on > behalf of Paul Barry > Sent: Wednesday, June 28, 2017 12:30:25 PM > To: Bhaskar Dhariyal > Cc: python-list@python.org > Subject: Re: Combining 2 data series into one > > Maybe look at using .concat instead of + > > See: > http://

Re: Combining 2 data series into one

2017-06-28 Thread Albert-Jan Roskam
M To: Bhaskar Dhariyal Cc: python-list@python.org Subject: Re: Combining 2 data series into one Maybe look at using .concat instead of + See: http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.06-Concat-And-Append.ipynb On 28 June 2017 at 13:02, Paul Barry w

Re: Combining 2 data series into one

2017-06-28 Thread Bhaskar Dhariyal
On Wednesday, 28 June 2017 18:01:19 UTC+5:30, Paul Barry wrote: > Maybe look at using .concat instead of + > > See: > http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.06-Concat-And-Append.ipynb > > On 28 June 2017 at 13:02, Paul Barry wrote: > > > >

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
Maybe look at using .concat instead of + See: http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.06-Concat-And-Append.ipynb On 28 June 2017 at 13:02, Paul Barry wrote: > > Maybe try your code on a sub-set of your data - perhaps 1000 lines of > data? -

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
Maybe try your code on a sub-set of your data - perhaps 1000 lines of data? - to see if that works. Anyone else on the list suggest anything to try here? On 28 June 2017 at 12:50, Bhaskar Dhariyal wrote: > No it didn't work. I am getting memory error. Using 32GB RAM system > > On Wed, Jun 28, 2

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
On the line that's failing, your code is this: combinedX=combinedX+dframe['tf'] which uses combinedX on both sides of the assignment statement - note that Python is reporting a 'MemoryError", which may be happening due to this "double use" (maybe). What happens if you create a new dataframe,

Re: Combining 2 data series into one

2017-06-28 Thread Bhaskar Dhariyal
On Wednesday, 28 June 2017 14:43:48 UTC+5:30, Paul Barry wrote: > This should do it: > > >>> import pandas as pd > >>> > >>> df1 = pd.DataFrame(['bhaskar', 'Rohit'], columns=['first_name']) > >>> df1 > first_name > 0bhaskar > 1 Rohit > >>> df2 = pd.DataFrame(['dhariyal', 'Gavval'], col

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
This should do it: >>> import pandas as pd >>> >>> df1 = pd.DataFrame(['bhaskar', 'Rohit'], columns=['first_name']) >>> df1 first_name 0bhaskar 1 Rohit >>> df2 = pd.DataFrame(['dhariyal', 'Gavval'], columns=['last_name']) >>> df2 last_name 0 dhariyal 1Gavval >>> df = pd.DataFrame