You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The csv file quite big ~25MB, and a quite difficult to process in Excel/Numbers/Spreadsheet software.
As a programmer, I want to get the first 1000 rows using Python.
Solution:
import pandas as pd
df = pd.read_csv("DATA_CUSTOM.csv")
print(df.head(2000).to_csv("export-1k-rows.csv"))
Lesson:
Find a smart way to process things.
Take advantage of programming language and library, for example in this case are: python and pandas.
The text was updated successfully, but these errors were encountered:
Problem:
The csv file quite big ~25MB, and a quite difficult to process in Excel/Numbers/Spreadsheet software.
As a programmer, I want to get the first 1000 rows using Python.
Solution:
Lesson:
python
andpandas
.The text was updated successfully, but these errors were encountered: