Output Issues with pandas, Python
Begin Code import pandas as pd df = pd.read_csv('C:/Users/lhicks/Documents/Corporate/test.csv', 'r') saved_column = df.FirstName saved_column2 = df.LastName saved_column3 = df.Email print saved_column print saved_column2 print saved_column3 Itemlist =  Itemlist.append(saved_column) print Itemlist End of Code The objective is to select specific columns from a specified xls sheet, grab all the rows from the specified columns, and then print that data out. The current issue is the data is grabbed correctly, but after 29-30 rows, it prints/stores a "...", and then jumps to line item 880s, and finishes out from there. The additional issue is that it also stores this as the value, making it worthless due to not providing the full dataset. The eventual process is to add the selected columns to a new xls sheet to clean up the old data, and then add the rows to a templated document to generate an advertisement letter. The first question is how to I have all the fields populate? The second is what is the best approach for this? Please provide additional links as well if possible, this is a practical learning experience for me.
Pandas tries to shorten your data when printing it. NOTE: all the data is still there (print(df.shape) - to check it, print the shape of your DataFrame), it's just a convenient way not to flood your screen with tons of data rows/columns Try this: fn = 'C:/Users/lhicks/Documents/Corporate/test.csv' cols = ['FirstName','LastName','Email'] df = pd.read_csv(fn, usecols=cols) df.to_excel('/path/to/excel.xlsx', index=False) This will parse only ['FirstName','LastName','Email'] columns from a CSV file and will export them to Excel file UPDATE: if you want to control how many rows should Pandas print: with pd.option_context("display.max_rows",200): print(df)
Django admin site not opening while running from pydev in eclipse
WebdriverWait is showing TimeoutException, if i use sleep.time it works ok
Python: Create Array from Indexed List
Overlaying n (user generated) points over a graph
How to get django model object in save method
How to pass file pointer in dll routines using ctypes in python
unable insert jpeg into filemaker db with pyodbc : HY011 ODBC Error
How to pass parameter as pointer in Python [duplicate]
Combine text files into key/value
Python modules not found over terminal but on python shell, Linux
Can PyCharm automatically generate __init__(), __eq__() and __hash__() implementations?
Create multi-level index pandas dataframe from delimited string column
Cross referencing decorators
Best way to speed up the process of creating dictionaries when dealing with a large amount of netflow data in a .json file in Python?
OpenCV Python - No module named cv2 (again)
How to find isolated vertices?