[Python] Script useful for Excel / csv processing


#Read
df = pd.read_csv('zenkoku.csv', low_memory=False)

#Delete column
df = df.drop("Office flag", axis=1)


#Rename column
df = df.rename(columns={'Change before':'After change'})

#Add column
df = df.assign('Column name'='value')

#output(No index)
df.to_csv('zenkoku2.csv', index=False)

Data to be processed

Recommended Posts

[Python] Script useful for Excel / csv processing
[Python] Iterative processing (for, while)
Stylish technique for pasting CSV data into Excel with Python
Python script for ldapsearch base64 decode
Personal notes for python image processing
Notes for me python csv graph
Handle Excel CSV files with Python
AWS Layer Creation Script for python
[Good By Excel] python script to generate sql to convert csv to table
Driver script for parametrically calculating Python scripts
Summary of useful techniques for Python Scrapy
Python> Output numbers from 1 to 100, 501 to 600> For csv
python [for myself]
Script python file
(Miscellaneous notes) Data update pattern from CSV data acquisition / processing to Excel by Python
python image processing
Python Pandas is not suitable for batch processing
python script skeleton
Import-linter was useful for layered architecture in Python
Python script profiling
Import python script
Python file processing
Image processing? The story of starting Python for
Image Processing with Python Environment Setup for Windows
5 Reasons Processing is Useful for Those Who Want to Get Started with Python
PDF files and sites useful for learning Python 3
Csv in python
Run a python script from excel (using xlwings)
Excel with Python
Full-width and half-width processing of CSV data in Python
Image collection Python script for creating datasets for machine learning
[Python] Measures and displays the time required for processing
3. Natural language processing with Python 4-1. Analysis for words with KWIC
Building an environment for natural language processing with Python
Python Script for Hiroshima University Non-SSO Authentication Login / Logout
[Introduction for beginners] Reading and writing Python CSV files
Process csv data with python (count processing using pandas)
Python script to create a JSON file from a CSV file
Python distributed processing Spartan
Python basics ② for statement
File processing in Python
Python: Natural language processing
Communication processing by Python
Multithreaded processing in python
[Python] Super useful debugging
First Python image processing
Run python from excel
About Python, for ~ (range)
Handle Excel with python
Text processing in Python
python textbook for beginners
Queue processing in Python
DynamoDB Script Memo (Python)
python for android Toolchain
Image processing with Python
Python programming in Excel
Csv tinkering with python
python useful memo links
Read Python csv file
OpenCV for Python beginners
[Python] Reading CSV files