Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • PLSQL Table Syntax 1 Oracle
  • Composite Index creation tip from Vivek Oracle
  • Find sort details from Db find_sort.sql Oracle
  • myfile Oracle
  • Monitor and Trace Unix processes using truss Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • find checksum of a file. Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • tab.sql Oracle
  • Finding locked objects Oracle
  • proper cpu stats Linux/Unix
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • Good Oracle Architecture In Short and point to point Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) 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

  • Getting started with notebook Python/PySpark
  • Reading config file from other folder inside class Python/PySpark
  • Add new columns in dataframe Python/PySpark
  • Read CSV file using PySpark Python/PySpark
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • 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 (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
  • Create type and Grant on it. Oracle
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • plan10g.sql good1 Oracle
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • More info about /proc folder and its relation with processes. Linux/Unix
  • Generate SSH without password authentication. Linux/Unix
  • before_trunc.sql Before Truncate table needs to execute following: Oracle
  • Deleting first line and lastline of a file using sed Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme