Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Reshaping a single column in to multiple column using Python
Post: RE: Reshaping a single column in to multiple colum...

I have found a strange thing. If i add one more row in my column, the same code performs as intended. Image Please note now I have 31 rows. To me it seems that something has to do with indexing.
sahar General Coding Help 7 2,071 Jun-20-2022, 08:25 AM
    Thread: Reshaping a single column in to multiple column using Python
Post: RE: Reshaping a single column in to multiple colum...

(Jun-19-2022, 07:20 PM)deanhystad Wrote: reshape is a function, not a method of nparray. The call is "new_array = numpy.reshape(arr, (10, -1))". Hi, thanks for your explanation. I have tried this b...
sahar General Coding Help 7 2,071 Jun-20-2022, 05:45 AM
    Thread: Reshaping a single column in to multiple column using Python
Post: RE: Reshaping a single column in to multiple colum...

Ok, I have tried but could not get the desired result. import pandas as pd import numpy as np df = pd.read_excel('sample.xlsx') first_column = pd.DataFrame(df.iloc[:,0]) arr = np.array(first_column) ...
sahar General Coding Help 7 2,071 Jun-19-2022, 02:48 PM
    Thread: Reshaping a single column in to multiple column using Python
Post: Reshaping a single column in to multiple column us...

I have an excel file containing a single column (Row's number is not fixed). Using Python 3, I want to, Import my excel file/data in python, Read/select the data column (first column), and Reshape t...
sahar General Coding Help 7 2,071 Jun-19-2022, 10:45 AM

User Panel Messages

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