Documentation ¶
Overview ¶
SizeStruct project clone from https://github.com/Re-volution/sizestruct
Index ¶
- Constants
- func AddDays(current string, delta int) string
- func AddDaysExceptWeekend(current string, delta int) string
- func ConvertTo(src string, srcCode string, tagCode string) string
- func DateToStr(item time.Time) string
- func Element(data dataframe.DataFrame, row int, colname string) series.Element
- func FileListInPath(filePath string) ([]string, error)
- func FindInIntegerSlice(n int, nAry []int) int
- func FindInStringSlice(str string, s []string) int
- func GenerateIndex(start, step, max int) []int
- func GetExeDir() string
- func IsDirExist(path string) bool
- func IsFileExists(path string) (bool, error)
- func NewUUID() string
- func RandomMacAddress() string
- func ReIndex(df *dataframe.DataFrame) dataframe.DataFrame
- func ReadCSV(filename string, options ...dataframe.LoadOption) dataframe.DataFrame
- func SizeStruct(data interface{}) int
- func StrToDate(date string) time.Time
- func Today() string
- func WriteCSV(filename string, mode int, df *dataframe.DataFrame, ...) error
Constants ¶
View Source
const (
IndexColName = "__dato_idx__"
)
*
- 为df重新设置index,如果没有则添加index列,如果有则重新设置index的值
Variables ¶
This section is empty.
Functions ¶
func ConvertTo ¶
*
- 字符串转换编码
- param string src: 待转换的字符串
- param string strCode: 源编码
- param string tagCode: 目标编码
func FileListInPath ¶
*
获取指定目录中的文件列表 :param file_path: 指定的路径 :return: []string, error :notice 只遍历文件忽略文件夹
func FindInIntegerSlice ¶
从 slice 中查找指定的数字 返回相应的索引值,找不到返回-1
func FindInStringSlice ¶
从 slice 中查找指定的字符串 返回相应的索引值,找不到返回-1
func ReadCSV ¶
func ReadCSV(filename string, options ...dataframe.LoadOption) dataframe.DataFrame
*
- 从CSV中加载df数据
func SizeStruct ¶
func SizeStruct(data interface{}) int
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.