What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-18 01:55:03
how to map longitude and latitude in python
from shapely.geometry import Point import geopandas as gpd from geopandas import GeoDataFrame df = pd.read_csv("Long_Lats.csv", delimiter=',', skiprows=0, low_memory=False) geometry = [Point(xy) for xy in zip(df['Longitude'], df['Latitude'])] ... Add solution -
-
Python 2022-02-06 20:00:24
pandas read_csv random rows
import pandas as pd import numpy as np filename = 'hugedatafile.csv' nlinesfile = 10000000 nlinesrandomsample = 10000 lines2skip = np.random.choice(np.arange(1,nlinesfile+1), (nlinesfile-nlinesrandomsample), replace=False) df = pd.read_csv(filename, skip... Add solution -
Python 2022-02-02 17:46:23
colab import python file
from google.colab import files files.upload() # run the above code and click on the enabled "Choose Files" button import pandas as pd df = pd.read_csv('your uploades file name.csv') # df is a changable variable df.head() # shows first 5 rows Add solution