Aquesta és una revisió antiga del document


Python Pandas

  • pip3 install pandas
  • soporte para excel:
    pip3.9 install openpyxl # needed to load Excel .xlsx files
    pip3.9 install xlrd # needed to load Excel old .xls files)
from bokeh.plotting import figure, output_file, show
 
p=figure(width=500,height=400, tools='pan')
 
p.title.text="Cool Data"
p.title.text_color="Gray"
p.title.text_font="times"
p.title.text_font_style="bold"
p.xaxis.minor_tick_line_color=None
p.yaxis.minor_tick_line_color=None
p.xaxis.axis_label="Date"
p.yaxis.axis_label="Intensity"    
 
p.line([1,2,3],[4,5,6])
output_file("graph.html")
show(p)
# segundo bokeh plot con pandas
from bokeh.plotting import figure
from bokeh.io import output_file, show
import pandas
 
df=pandas.read_csv("https://pythonizing.github.io/data/bachelors.csv")
 
x=df["Year"]
y=df["Engineering"]
 
output_file("Line.html")
 
f=figure()
f.line(x,y)
 
show(f)
  • development/python/pandas.1728561598.txt.gz
  • Darrera modificació: 10/10/2024 04:59
  • per mate