Pandas-based File Operation
Jump to navigation
Jump to search
A Pandas-based File Operation is a Python-based File Operation (a file operation) that is a Pandas-based operation.
- Context:
- It can range from being a Pandas-based File Open Operation to being a Pandas-based File Close Operation (on Python file descriptors).
- It can range from being a Pandas-based File Read Operation to being a Pandas-based File Write Operation (such as a Python file append operation).
- It can range from being a Pandas-based File Metadata Operation.
- …
- Example(s):
- a Pandas-based CSV File Operation, such as:
pandas_df = pandas.read_csv("./file.csv.zip", compression='zip', header=0, sep=',', quotechar='"', skiprows=0) ;
pandas_df.to_csv("out.tsv", sep='\t', index=True, cols=["col3","col1"], encoding='utf-8') ;
- a Pandas-based Excel File Operation, (using the
xlrd
package), such as:pandas_df = pd.read_excel('data.xlsx', index_col=0)
.pandas_df.to_excel('data.xlsx')
- …
- a Pandas-based CSV File Operation, such as:
- Counter-Example(s):
with open('testit.txt', encoding="utf8") as f:
inputFileText = f.read()
mylist = f.read().splitlines()
print(inputFileText)
mylist[0:10]
- See: Python Coding Example.