Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • eplan9i.sql Oracle
  • Rename Tablespace Oracle
  • How to know Number of CPUs on Sun Box Linux/Unix
  • Caching sequence in Memory Oracle
  • Drop database in Oracle 10g Oracle
  • Implementation of key based authentications Linux/Unix
  • Oracle Statspack survival Guide Oracle
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • Index Range Scan Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • export import with parameter file. Oracle
  • VIvek Encryption Package and Its Usage Oracle
  • Oracle 10g Wait Model Oracle
  • how to find OS block size Oracle
  • dbms_job.submit example Oracle

Read CSV File using Python

Posted on 30-Sep-202330-Sep-2023 By Admin No Comments on Read CSV File using Python
# Databricks notebook source
import pandas as pd

# preapre dataframe
df_h=pd.read_csv("https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv")

#Print dataframe
df_h

#define custom columns
columns = ["Srno", "SQFT", "BR", "Baths", "Zipcode", "YearBuilt", "ListPrice"]
df_h=pd.read_csv("https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv",
header=None,
names=columns)

#Print dataframe
df_h

# show top 10 rows
df_h.head(10)

# show last 10 rows
df_h.tail(10)

#Print dataframe
df_h

#Drop non-needed columns, column names are case sensitive
df_d=df_h.drop(["SQFT", "Srno"], axis=1)

#Print dataframe
df_d

# Select specific columns
df_s = df_d[["BR", "ListPrice"]]

#Print dataframe
df_s


Python/PySpark

Post navigation

Previous Post: Creating never expiring DB user accounts in Oracle
Next Post: Read CSV file using PySpark

Related Posts

  • Read CSV file using PySpark Python/PySpark
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • Getting started with notebook Python/PySpark
  • Add new columns in dataframe Python/PySpark
  • Reading config file from other folder inside class Python/PySpark
  • Python class import from different folders Python/PySpark

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Jai Shree Ram Oracle
  • Goog notes on X$ tables Oracle
  • How to see which patches are applied. Oracle
  • useful dg links Oracle
  • Oracle 11g RAC on OEL 5 and Vmware 2 Oracle
  • CPU speed on solaris Linux/Unix
  • How to find password change date for user Oracle
  • find_longsql.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme