GithubHelp home page GithubHelp logo

drabastomek / learningpyspark Goto Github PK

View Code? Open in Web Editor NEW
617.0 617.0 482.0 7.32 MB

Code base for the Learning PySpark book (in preparation)

License: GNU General Public License v3.0

Jupyter Notebook 99.56% Python 0.44% Shell 0.01%

learningpyspark's People

Contributors

dennyglee avatar drabastomek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learningpyspark's Issues

Chapter 5 - Runs really long...

The code seems to not stop really...

I have a 6 node Spark Cluster running PySpark3. Perhaps the issue boils down to how I have births_train saved.

I saved the file to my storage as a .csv and not a .csv.gz

base_dir = 'adl://dasciencestorage.azuredatalakestore.net/clusters/dascience/data/open_data/'
births = spark.read.csv(base_dir + 'births_train.csv',
header=True,
schema=schema)

The exact code giving me issues is anything that tries to display what is in births births.describe().show() or even your code that ends with .take(5)

Thoughts?

Doesn't describ what "sc" actually is.

data = sc.parallelize(
[('Amber', 22), ('Alfred', 23), ('Skye',4), ('Albert', 12),
('Amber', 9)])

You don't show any importing, contextualizing or anything of the sort. Came here after buying the book and looking to actually save my confusion only to be more confused.

Chapter 4 code not working with Python 2.7

This code fragment in Chapter 4 example code does not work with Python 2.7:

fields = [
    *[
        typ.StructField(h[1:-1], typ.IntegerType(), True)
        for h in header.split(',')
    ]
]

It results in the SyntaxError: invalid syntax error.

Looks like this code is Python 3.x specific. It can be fixed by removing the inner *[ ... ] brackets.

%sql commands not working.

Chapter03.ipynb.

%sql

select * from swimmersJSON

symtaxError: invalid syntax.

I am using google colab notebook for this.

I have tried %sql with BigQuery. it worked. Did anything change?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.