PySyntax.jl

(*deprecated*) PySyntax.jl allows Python-like syntax in Julia. Py.jl provides a light wrapper on top of PyCall.jl in the form of a macro.
Popularity
6 Stars
Updated Last
2 Years Ago
Started In
August 2017

PySyntax Travis-CI Build Status AppVeyor

This package is deprecated:


PySyntax.jl enables using Python-like syntax in Julia. It provides a light wrapper on top of PyCall.jl, in the form of a macro.

Installation

Within Julia, just use the package manager to run Pkg.clone("https://github.com/kdheepak/PySyntax.jl") to install the files. Julia 0.5 or later is recommended.

Usage

In a session, type the following to export the @py macro.

using PySyntax

The @py macro allows Python-like syntax

@pyimport pandas as pd
df = pd.DataFrame(
    Dict(
        "name"=>["John", "Jane", "Zack", "Zoey"],
        "salary"=>[100000, 100000, 100000, 100000]
        )
)
@py df = df.set_index("name")
@py df["John":"Jane"]

See notebooks for examples. See JuliaPy/PyCall.jl#86 for the discussion on this subject.

Improvements, suggestions or contributions welcome!