|
| 1 | +import pyarrow as pa |
| 2 | + |
| 3 | +### When dtype -> arrow ambiguious, override |
| 4 | +KNOWN_FIELDS = [ |
| 5 | + [0, 'contributors', pa.string()], |
| 6 | + [1, 'coordinates', pa.string()], |
| 7 | + [2, 'created_at', pa.string()], |
| 8 | + |
| 9 | + #[3, 'display_text_range', pa.list_(pa.int64())], |
| 10 | + [3, 'display_text_range', pa.string()], |
| 11 | + |
| 12 | + [4, 'entities', pa.string()], |
| 13 | + [5, 'extended_entities', pa.string()], #extended_entities_t ], |
| 14 | + [7, 'favorited', pa.bool_()], |
| 15 | + [8, 'favorite_count', pa.int64()], |
| 16 | + [9, 'full_text', pa.string()], |
| 17 | + [10, 'geo', pa.string()], |
| 18 | + [11, 'id', pa.int64() ], |
| 19 | + [12, 'id_str', pa.string() ], |
| 20 | + [13, 'in_reply_to_screen_name', pa.string() ], |
| 21 | + [14, 'in_reply_to_status_id', pa.int64() ], |
| 22 | + [15, 'in_reply_to_status_id_str', pa.string() ], |
| 23 | + [16, 'in_reply_to_user_id', pa.int64() ], |
| 24 | + [17, 'in_reply_to_user_id_str', pa.string() ], |
| 25 | + [18, 'is_quote_status', pa.bool_() ], |
| 26 | + [19, 'lang', pa.string() ], |
| 27 | + [20, 'place', pa.string()], |
| 28 | + [21, 'possibly_sensitive', pa.bool_()], |
| 29 | + [22, 'quoted_status', pa.string()], |
| 30 | + [23, 'quoted_status_id', pa.int64()], |
| 31 | + [24, 'quoted_status_id_str', pa.string()], |
| 32 | + [25, 'quoted_status_permalink', pa.string()], |
| 33 | + [26, 'retweet_count', pa.int64()], |
| 34 | + [27, 'retweeted', pa.bool_()], |
| 35 | + [28, 'retweeted_status', pa.string()], |
| 36 | + [29, 'scopes', pa.string()], |
| 37 | + [30, 'source', pa.string()], |
| 38 | + [31, 'truncated', pa.bool_()], |
| 39 | + [32, 'user', pa.string()], |
| 40 | + |
| 41 | + #[33, 'withheld_in_countries', pa.list_(pa.string())], |
| 42 | + [33, 'withheld_in_countries', pa.string()], |
| 43 | + |
| 44 | + #[34, 'followers', pa.struct({'followers': pa.bool_()})] |
| 45 | + [34, 'followers', pa.string()] |
| 46 | +] |
| 47 | + |
| 48 | + |
| 49 | + |
0 commit comments