0

I am having issues understanding Flask API's and what is needed to return the required information. I can print the data such as:

crunchbaseNY = crunchbase[crunchbase['city'] == 'New York']
print(crunchbaseNY)

but when put into Flask it is returned as 'None'

from flask import Flask, render_template
app = Flask("MyApp")

@app.route('/')
def hello_world():
    output = print(crunchbaseNY)
    return render_template('index.html', result=output)
    #return output
    
app.run(host='localhost', port=5001)
Zachqwerty
  • 85
  • 6

1 Answers1

1

You did

output = print(crunchbaseNY)

print do print and return None, please change it to

output = str(crunchbaseNY)
Daweo
  • 31,313
  • 3
  • 12
  • 25