Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Transfer SQL Profiles from One database to other database. Oracle
  • scripts to take listener.log backup Linux/Unix
  • Oracle Material from OTN Oracle
  • Monitor and Trace Unix processes using truss Linux/Unix
  • Histogram Overview Oracle
  • Find long Running Transaction Linux/Unix
  • fuser to check who is using diretory Linux/Unix
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • tab.sql Oracle
  • Goldengate document from Porus Oracle
  • .profile Linux/Unix
  • sid_wise_sql.sql Further explaination Oracle
  • Drop database in Oracle 10g Oracle
  • How do I get Oracle to automatically start when my server boots up? 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

  • Add new columns in dataframe Python/PySpark
  • Reading config file from other folder inside class Python/PySpark
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • Getting started with notebook Python/PySpark
  • Python class import from different folders Python/PySpark
  • Read CSV file using PySpark 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 (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Python class import from different folders Python/PySpark
  • This is from Temi Oracle
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • How to sort list of files on basis of their sizes. Linux/Unix
  • on IBM-AIX for display Linux/Unix
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • DB Console Mainenance. Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme