simplejson.errors.JSONDecodeError: Expecting value: line column () 提示说是解码错误 可以用下面的方法判断json文件是否为空 import json#读取 with open('tmp.json', 'r') as f: data = f.read() if(not bool(data)): print("json is empty!") 但是在非空情况下会报错!!! import json data ={"
; i >= ; i--) { if (list[i].NO == item.NO) { list.RemoveAt(i); } } public void RemoveItemFromList(ref List <A> list, A item) { List <A> tempList = new List <A>(); foreach (A a in list) { if (a.NO != item.NO && !tempList.Contai
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; public class FastJsonArrayTest { public static void main(String[] args) { JSONObject jo = new JSONObject(); jo.put("name", null); jo.put("age", ); jo.put(&q
去除null.NaN 去除 dataframe 中的 null . NaN 有方法 drop ,用 dataframe.na 找出带有 null. NaN 的行,用 drop 删除行: import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.sql.{DataFrame, SQLContext, SparkSession} /** * Created by TTyb on 2017/10/12. */ o