我正在尝试了解 api 获取,并且我遵循了这里的其他一些答案,但是我在这个脚本上不断收到一个奇怪的错误:
const fetcher = async () => {
const url = 'https://banana1.free.beeceptor.com/cars'
const response = await fetch(url) //once we fetch we get a resposne
const json_data = await response.json()
return json_data
}
const Publish = () => {
const [loading, setLoading] = useState(true)
const [choices, setChoices] = useState([])
useEffect(()=>{
const choiceGetter = async () => {
await fetcher().then(json_data=>{
setChoices(json_data);
setLoading(false);
console.log(json_data)
})
};
choiceGetter();
},[])
return(
<>
<h1>
{loading&&<>loading...</>}
{!loading&&choices&&
choices.map( (choice) => {
const {option,make} = choice; …
Run Code Online (Sandbox Code Playgroud) 寻找这样的东西:
将 Dataframe 保存为 csv 直接保存到 s3 Python
api 显示这些参数: https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.DataFrame.write_parquet.html
但我不知道如何将 df 转换为流......